#13061 closed Uncategorized (invalid)
Default login template is on bad place - registration/login.html TemplateDoesNotExist
Reported by: | sopuch | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | 1.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
django.contrib.auth.views.login points to default template (template_name=registration/login.html) to bad place - produce TemplateDoesNotExist error. I think, this template is in admin/login.html.
Change History (6)
comment:1 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 15 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Ah, OK. But There isn't login.html template in registration directory. So it's not on bad place but is missing.
follow-up: 5 comment:3 by , 15 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Omitted on purpose. We can't provide a template that will work on every site. You need to provide the template, and registration/login.html is a default suggested location.
comment:5 by , 6 years ago
Easy pickings: | unset |
---|---|
Severity: | → Normal |
Type: | → Uncategorized |
UI/UX: | unset |
Replying to Russell Keith-Magee:
Omitted on purpose. We can't provide a template that will work on every site. You need to provide the template, and registration/login.html is a default suggested location.
Why exactly a login template working on every site can't be provided? I just start learning django one month ago and I reach here looking for this. I just create a 'registration/login.html' file with only one line: {% extends "admin/login.html" %} and it is working great. I don't fully understand yet how auth works but seems possible to admin/login.html can be called somehow instead extend it... or not?
comment:6 by , 6 years ago
Hi Yamil.
I can appreciate that needing to create your own templates seems a pain when you're getting up and running. It's always been this way, and I remember wanting such templates provided for me when I started too.
There's a point about this on the Django Registration FAQ:
Providing default templates with an application is ranges from hard to impossible, because different sites can have such wildly different design and template structure. Any attempt to provide templates which would work with all the possibilities would probably end up working with none of them.
If you search for "django auth templates" or "django registration templates" you can find samples on the internet, but I cannot vouch for their reliability: I advise you to use them as a guide rather than copy anything wholesale into your project.
No, that's the correct location. The admin does its own separate login template.