#33592: `view_on_site` redirect does not work for custom admin site
--------------------------------------------+------------------------
Reporter: Stefan Wehrmeyer | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 4.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
All `reverse` calls in `contrib/admin/options.py` have a `current_app`
keyword argument, so they resolve with the current (possibly custom) admin
site – except the `reverse` call in `get_view_on_site_url`. This lead to
custom admin sites using the default admin to redirect via `view_on_site.
This is clearly a bug. When the default admin is handled with extra
protections outside of Django (e.g. additional basic auth), users of the
custom admin cannot use the "view on site" link because it routes through
the default admin.
Patch is easy and already here:
https://github.com/django/django/pull/15526
I'll try to provide a regression test as well.
--
Ticket URL: <https://code.djangoproject.com/ticket/33592>
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/0107017fab6d73a1-00239a4d-ac6d-4216-b035-3d5f9c7982cc-000000%40eu-central-1.amazonses.com.