Django TemplateDoesNotExist admin / login.html [英] Django TemplateDoesNotExist admin/login.html
问题描述
TemplateDoesNotExist at / admin /
admin / login.html
我尝试重新安装django,但我没有工作...请帮助!
如果您收到TemplateDoesNotExist错误,那意味着您指的是不存在的模板。 :)您应该有一个模板目录,并检查该目录路径中是否存在admin / login.html。
这是Django 1.4的模板文档。与大多数股票文档相比,IMO的Django文档相当不错。
此外,您应该知道管理界面的设计不是真正被定制的。如果您使用manage.py脚本创建一个超级用户,那么内置的管理界面具有内置的登录功能。如果您正在尝试构建自己的模板,则应该从管理界面分开,除非您完全禁用/删除内置的管理界面,并从头开始设计自己的模板。修改内置的管理员代码比我认为更麻烦。
I am working with django 1.4. And this error appeared:
TemplateDoesNotExist at /admin/ admin/login.html
I tried to reinstall django, but i did not work... Please Help!
If you're getting a "TemplateDoesNotExist" error, that means you are referring to a template that does not exist. :) You should have a templates directory, and check to see if admin/login.html exists in that directory path.
This is the Django 1.4 template documentation. IMO the Django documentation is quite good compared to most stock documentation.
Also you should know that the admin interface is not really designed to be customized. The built-in admin interface has a login feature already built-in, if you create a superuser with the manage.py script. If you're trying to build your own template, you should do so separate from the admin interface, unless you disable/remove the built-in admin interface completely and design your own from scratch. Modifying built-in admin code is more trouble than it's worth in my opinion.
这篇关于Django TemplateDoesNotExist admin / login.html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!