每次我尝试访问管理页面时都会收到此错误消息 这是Traceback
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.3.1
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Template Loader Error:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
/home/ajmi/spam/templates/admin/login.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/login.html (File exists)
/usr/local/lib/python2.7/dist- packages/django/contrib/admindocs/templates/admin/login.html (File does not exist)
Using loader django.template.loaders.eggs.Loader:
login.html文件不存在,如何解决此问题。 谢谢
答案 0 :(得分:0)
谢谢大家,我通过输入以下内容将root权限更改为
sudo python manage.py runserver.
并且效果很好