0

TemplateDoesNotExist 位于 /accounts/login/

registration/login.htm


Template-loader postmortem

Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
C:\Python27\django\demo_email\APPemail\template\registration\login.html (File does not exist)
C:\Python27\django\demo_email\demo_email\registration\registration\login.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
C:\Python27\lib\site-packages\django\contrib\auth\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\captcha\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\django_facebook-5.2.6-py2.7.egg\django_facebook\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\django\contrib\admin\templates\registration\login.html (File does not exist)

错误视图 环境:

Request Method: GET
Request URL: http://netch.pagekite.me/accounts/login/
**i am using local tp public server**

Django Version: 1.5.2
Python Version: 2.7.4
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_countries',
 'captcha',
 'django_facebook',
 'django.contrib.admin',
 'APPemail')
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',
 'django_facebook.middleware.FacebookCanvasMiddleWare')

Template Loader Error:
Django tried loading these templates, in this order:
Using loader django.template.loaders.filesystem.Loader:
C:\Python27\django\demo_email\APPemail\template\registration\login.html (File does not exist)
C:\Python27\django\demo_email\demo_email\registration\registration\login.html (File does not exist)
Using loader django.template.loaders.app_directories.Loader:
C:\Python27\lib\site-packages\django\contrib\auth\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\captcha\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\django_facebook-5.2.6-py2.7.egg\django_facebook\templates\registration\login.html (File does not exist)
C:\Python27\lib\site-packages\django\contrib\admin\templates\registration\login.html (File does not exist)

追溯:

File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  140.                     response = response.render()
File "C:\Python27\lib\site-packages\django\template\response.py" in render
  105.             self.content = self.rendered_content
File "C:\Python27\lib\site-packages\django\template\response.py" in rendered_content
  80.         template = self.resolve_template(self.template_name)
File "C:\Python27\lib\site-packages\django\template\response.py" in resolve_template
  58.             return loader.get_template(template)
File "C:\Python27\lib\site-packages\django\template\loader.py" in get_template
  146.     template, origin = find_template(template_name)
File "C:\Python27\lib\site-packages\django\template\loader.py" in find_template
  139.     raise TemplateDoesNotExist(name)

Exception Type: TemplateDoesNotExist at /accounts/login/
Exception Value: registration/login.html

我该如何解决这个错误?

我试过 django-facebook 5.2.6。

但是当我在 /accounts/login/registration/login.htm* 调用 /accounts/login 错误 TemplateDoesNotExist 时它给了我错误*

4

0 回答 0