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.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
I agree with you that this behaviour is inconsistent.
You are welcome to supply a patch, if you want to.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:1>
* cc: d1fffuz0r@… (added)
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* needs_docs: 0 => 1
Comment:
added patch, if it's right way, then I'll do documentation and
translations
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:2>
Comment (by timo):
While this would make things more consistent, wouldn't it be backwards
incompatible?
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:3>
Comment (by ramiro):
Replying to [comment:3 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:4>
Comment (by Kamu):
The overriding of logout/login templates was added in 1.2 Alpha in
response to ticket #8933.
https://github.com/django/django/commit/a2056919799e48f053fa16b65569fc1e8f57ebe1
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:5>
Comment (by susan):
I've just applied the given attached patch. I get an error:
"TemplateDoesNotExist: admin/logged_out.html" How do i fix this?
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:6>
* status: new => assigned
* owner: nobody => alexisbellido
Comment:
Pull request here:
https://github.com/django/django/pull/1563
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:7>
Comment (by apollo13):
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).
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:8>
Comment (by alexisbellido):
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?
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:9>
* type: Bug => Cleanup/optimization
* easy: 1 => 0
Comment:
@alexisbellido Yes, some form of backwards compatibility will be needed
here.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:10>
Comment (by rschwiebert):
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?
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:11>
* cc: ryan.c.schwiebert@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:12>
Comment (by Bryan Marty):
I encountered this bug while following the documentation as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:13>
Comment (by Hamifthi):
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
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:14>
Comment (by felixxm):
Hamed, feel-free to prepare a patch.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:15>
Comment (by Hamed Fathi):
Replying to [comment:15 felixxm]:
> Hamed, feel-free to prepare a patch.
Hello, well how can I do that? Can you please tell me where I should read
about contributing guideline?
Thank you.
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:16>
Comment (by felixxm):
See [https://docs.djangoproject.com/en/3.0/internals/contributing/
"Contributing to Django"].
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:17>
Comment (by Hamed Fathi):
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?
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:18>
* owner: Alexis Bellido => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/20372#comment:19>