#35620: LOGIN_REDIRECT_URL has no effect.
-------------------------------------+-------------------------------------
     Reporter:  holasoftware         |                    Owner:  (none)
         Type:  Uncategorized        |                   Status:  new
    Component:  contrib.admin        |                  Version:  5.1
     Severity:  Normal               |               Resolution:
     Keywords:  admin, login,        |             Triage Stage:
  LOGIN_REDIRECT_URL                 |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by holasoftware:

Old description:

> In the class 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.

New description:

 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.

--
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35620#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070190cf82ff2b-b80f4ce1-192d-4666-bb58-3689a67f7634-000000%40eu-central-1.amazonses.com.

Reply via email to