Environment:
Request Method: GET
Request URL: http://54.235.168.5/mds/
Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['sana.mrs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'sana.mrs.util.LoggingMiddleware')
Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
101. request.path_info)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
250. for pattern in self.url_patterns:
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_url_patterns
279. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_urlconf_module
274. self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
35. __import__(name)
File "/opt/sana/urls.py" in <module>
131. (r'^admin/(.*)', admin.site.root),
Exception Type: AttributeError at /
Exception Value: 'AdminSite' object has no attribute 'root'
重複する可能性があるのは、このエラーを修正する方法:「'Adminsite'オブジェクトに属性'root'がありません」です。
記載されている場所管理者のURLは次のとおりです。
url(r'^admin/', include(admin.site.urls))
そうではありません(r'^admin/(.*)', admin.site.root)
-Django1.0用です。Django 1.3の場合、それは機能しません。
その後、このエラーが発生しました
NameError at /name'include'が定義されていません
Environment:
Request Method: GET
Request URL: http://54.235.168.5/mds/
Django Version: 1.3.1
Python Version: 2.7.3
Installed Applications:
['sana.mrs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'sana.mrs.util.LoggingMiddleware')
Traceback:
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
101. request.path_info)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
250. for pattern in self.url_patterns:
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_url_patterns
279. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_urlconf_module
274. self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
35. __import__(name)
File "/opt/sana/urls.py" in <module>
132. url(r'^admin/', include(admin.site.urls))
Exception Type: NameError at /
Exception Value: name 'include' is not defined
Djangoバージョン1.3.1を使用しています。