求助求助!!Django框架错误:ImportError at / No module named urls

huqiaosong 发布于 05/06 16:50
阅读 69
收藏 0

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 1.7.1
Python Version: 2.7.11
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'rest_framework',
 'rest_framework_swagger',
 'books_recsys_app')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  98.                 resolver_match = resolver.resolve(request.path_info)
File "/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  343.             for pattern in self.url_patterns:
File "/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  372.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  366.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py" in import_module
  37.     __import__(name)
File "/home/python/server_movierecsys/server_movierecsys/urls.py" in <module>
  21.     url(r'^docs/', include('rest_framework_swagger.urls')),
File "/home/python/.virtualenvs/py2/local/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
  28.         urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py" in import_module
  37.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named urls

加载中
返回顶部
顶部