Opened 12 years ago
Last modified 20 months ago
#20372 new Cleanup/optimization
using registration/logged_out.html template overrides admin logout
Reported by: | Owned by: | ||
---|---|---|---|
Component: | contrib.admin | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | d1fffuz0r@…, ryan.c.schwiebert@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
Hi
I created registration/login.html and registration/logged_out.html templates to handle my site login/logout using the provided auth views login/logout. While the admin app login using admin/login.html, it logouts using registration/logged_out.html. So, having my own registration/logged_out.html overrides that of the admin app.
Attachments (1)
Change History (20)
comment:1 by , 11 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 11 years ago
Attachment: | ticket_20372.diff added |
---|
use another template for logout in admin interface
comment:2 by , 11 years ago
Cc: | added |
---|---|
Has patch: | set |
Needs documentation: | set |
Patch needs improvement: | set |
added patch, if it's right way, then I'll do documentation and translations
follow-up: 4 comment:3 by , 11 years ago
While this would make things more consistent, wouldn't it be backwards incompatible?
comment:4 by , 11 years ago
Replying to timo:
While this would make things more consistent, wouldn't it be backwards incompatible?
If the inconsistent behavior is new (e.g.introduced with 1.4 or 1.5) I'm happy to call it a bug and fix it right away just like any other bug. The sooner the better.
If the has more historical roots IMHO we can apply the same reasoning but I'm open to suggestions about how to handle the timeline.
comment:5 by , 11 years ago
The overriding of logout/login templates was added in 1.2 Alpha in response to ticket #8933.
https://github.com/django/django/commit/a2056919799e48f053fa16b65569fc1e8f57ebe1
comment:6 by , 11 years ago
I've just applied the given attached patch. I get an error: "TemplateDoesNotExist: admin/logged_out.html" How do i fix this?
comment:8 by , 11 years ago
Closing the PR for now since it is highly backwards incompatible; without some extra shim this will be hard to get in (at least needs comments in the releasenotes).
comment:9 by , 11 years ago
Thanks for the comment. Would you recommend me to spend some time writing that shim so that projects using the older templates locations continue to work?
comment:10 by , 11 years ago
Easy pickings: | unset |
---|---|
Type: | Bug → Cleanup/optimization |
@alexisbellido Yes, some form of backwards compatibility will be needed here.
comment:11 by , 9 years ago
I ran into this bug because it occurs in the course of following this documentation here: https://docs.djangoproject.com/en/1.9/topics/auth/default/#using-the-views
It's not very nice that the "happy path" outlined here in the docs runs into this bug. If the problem is going to continue to be unfixed, is there an inline warning that could go in the docs about the issue here?
comment:12 by , 9 years ago
Cc: | added |
---|
comment:14 by , 5 years ago
Hello please look at this bug because it's important to solve this issue because we need admin templates and custom templates be separate and we can create different templates in registration folder.
comment:16 by , 5 years ago
comment:18 by , 5 years ago
The problem is same structure of template and registration folder for admin and our own app. When we use auth admin view at default it will go to the admin template folder and registration folder and render that html file. Am I right? or it works in an other way?
comment:19 by , 20 months ago
Owner: | removed |
---|---|
Status: | assigned → new |
I agree with you that this behaviour is inconsistent.
You are welcome to supply a patch, if you want to.