[Django] #25242: Admin not redirecting to login for custom AdminSite

10 views
Skip to first unread message

Django

unread,
Aug 7, 2015, 1:27:59 AM8/7/15
to django-...@googlegroups.com
#25242: Admin not redirecting to login for custom AdminSite
---------------------------------+--------------------
Reporter: shadow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+--------------------
My django project has stopped redirecting me to the admin login when I am
not logged in, since moving from 1.8 to master.

Instead I see: "You don't have permission to edit anything.". However,
manually going to the login URL allows a successful login.

I am using a custom AdminSite.

I think it is probably related to this commit:

https://github.com/django/django/commit/be0ad62994a340ad54a0b328771931932a45a899

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

Django

unread,
Aug 7, 2015, 6:33:21 AM8/7/15
to django-...@googlegroups.com
#25242: Admin not redirecting to login for custom AdminSite
---------------------------------+--------------------------------------

Reporter: shadow | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0


Comment:

Can you show your custom admin site class?

--
Ticket URL: <https://code.djangoproject.com/ticket/25242#comment:1>

Django

unread,
Aug 7, 2015, 6:54:45 AM8/7/15
to django-...@googlegroups.com
#25242: Admin not redirecting to login for custom AdminSite
---------------------------------+--------------------------------------
Reporter: shadow | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: master
Severity: Release blocker | Resolution: invalid
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Changes (by shadow):

* status: new => closed
* resolution: => invalid


Comment:

Sorry, just realised this was my fault.

I forgot that I had previously extended the admin's index view, but forgot
to wrap the original view in admin_view() when calling it.

I guess I was logged-in the whole time and never noticed...

--
Ticket URL: <https://code.djangoproject.com/ticket/25242#comment:2>

Reply all
Reply to author
Forward
0 new messages