Django TemplateDoesNotExist admin/login.html

后端 未结 5 769
独厮守ぢ
独厮守ぢ 2021-01-21 19:04

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

5条回答
  •  无人共我
    2021-01-21 19:38

    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.

提交回复
热议问题