在尝试集成Twitter和Facebook时,Django中找不到模板。

时间:2013-09-07 13:38:47

标签: python django facebook templates django-templates

/ accounts / login /

上的TemplateDoesNotExist
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时它给了我错误    错误    TemplateDoesNotExist at / accounts / login /    登记/ login.htm * *

0 个答案:

没有答案