Opened 4 months ago
Last modified 4 months ago
#35620 closed Bug
LOGIN_REDIRECT_URL has no effect. — at Version 3
Reported by: | holasoftware | Owned by: | |
---|---|---|---|
Component: | contrib.admin | Version: | 5.1 |
Severity: | Normal | Keywords: | admin, login, LOGIN_REDIRECT_URL |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In the method
def login(self, request, extra_context=None):
of the class AdminSite, these lines have to removed:
if ( REDIRECT_FIELD_NAME not in request.GET and REDIRECT_FIELD_NAME not in request.POST ): context[REDIRECT_FIELD_NAME] = reverse("admin:index", current_app=self.name)
https://github.com/django/django/blob/main/django/contrib/admin/sites.py#L431-L435
Otherwise the setting
LOGIN_REDIRECT_URL
has no effect.
Change History (3)
comment:1 by , 4 months ago
Component: | Uncategorized → contrib.admin |
---|
comment:2 by , 4 months ago
Keywords: | admin login LOGIN_REDIRECT_URL added |
---|
comment:3 by , 4 months ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.