服务器工作正常,但是在使用延长这个“home.html的”文件无法链接模板:'TemplateDoesNotExist在/'错误在Django?
在“home.html做为”:
{%伸出“/模板1 /个人/了header.html”%} 尽管装载本地主机: Django的尝试加载这些模板,按以下顺序:
`使用Django的引擎:
- django.template.loaders.app_directories.Loader:在/ usr /local/lib/python2.7/dist-packages/django/contrib/admin/templates/ffgg/home.html(来源不存在)。
- django.template.loaders.app_directories.Loader:/usr/local/lib/python2.7/dist-packages/django/contrib/auth/templates/ffgg/home.html(来源不存在)`
的可能的复制[Django的TemplateDoesNotExist?](https://stackoverflow.com/questions/1926049/django-templatedoesnotexist) – thatrockbottomprogrammer
请张贴TEMPLATE_DIRS变量的内容在你的settings.py – rollinger
不要使用绝对路径(除非您的模板真的在该目录中,从根开始)。 – Evert