Django TemplateDoesNotExist admin / login.html [英] Django TemplateDoesNotExist admin/login.html

查看:1726
本文介绍了Django TemplateDoesNotExist admin / login.html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用django 1.4。这个错误出现了:



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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆