我试图在Windows机器上设置DJango restframework,并在运行代码时出现以下错误:配置Django-rest
已完成的步骤。
- 下载其余的框架&从GitHub
其他公用设施使用的easy_install我安装了所有的软件包。
这里是确认味精,
C:\Python27\Scripts>easy_install django-rest Searching for django-rest Best match: django-rest 0.0.1 Processing django_rest-0.0.1-py2.7.egg django-rest 0.0.1 is already the active version in easy-install.pth
Using c:\python27\lib\site-packages\django_rest-0.0.1-py2.7.egg Processing dependencies for django-rest Finished processing dependencies for django-rest
创建其创建的所有文件的新项目firstwebservice。
编辑settings.py文件和下面给出包括Django的休息,
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', )
冉项目
Error:-No module named rest_framework...
卸载方便,用pip重新安装。诚实轻松给了我很多问题。 – 2013-02-08 16:35:30