[Django] #21013: Admin history should consider ModelAdmin.get_queryset

6 views
Skip to first unread message

Django

unread,
Sep 1, 2013, 11:09:52 AM9/1/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------+--------------------
Reporter: jonash | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
* Model with custom default manager that excludes some objects
* ModelAdmin with custom `get_queryset` that includes more objects than
the manager
* History view throws 404 for any objects that aren't included the default
manager because it doesn't consider the ModelAdmin's `get_queryset`
method.

Test an fix attached. Tests are probably in the wrong place and need to be
moved.

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

Django

unread,
Sep 1, 2013, 11:11:16 AM9/1/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------+--------------------------------------

Reporter: jonash | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by jonash):

* needs_better_patch: => 1
* has_patch: 0 => 1
* component: Uncategorized => contrib.admin
* needs_tests: => 0
* needs_docs: => 0


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

Django

unread,
Sep 6, 2013, 3:58:39 PM9/6/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------+--------------------------------------
Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: assigned

Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

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

* owner: nobody => jcatalan
* status: new => assigned


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

Django

unread,
Sep 6, 2013, 4:23:07 PM9/6/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------+------------------------------------

Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: assigned
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

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

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/21013#comment:3>

Django

unread,
Sep 6, 2013, 4:24:29 PM9/6/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------+------------------------------------
Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: assigned
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------

Comment (by jcatalan):

I've checked the test and the patch and everything seems to be right. I'll
submit a PR and see if I can get some code review by a core dev.

--
Ticket URL: <https://code.djangoproject.com/ticket/21013#comment:4>

Django

unread,
Sep 6, 2013, 4:38:10 PM9/6/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------------+-------------------------------------

Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: assigned
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 1
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jcatalan):

* stage: Accepted => Ready for checkin


Comment:

I've submited a PR with your patch, so I'm changing this to Ready for
checkin though I still have to check if the test case is well located or
change it in case it's not.

--
Ticket URL: <https://code.djangoproject.com/ticket/21013#comment:5>

Django

unread,
Sep 7, 2013, 6:10:53 AM9/7/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------------+-------------------------------------
Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: assigned
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 1
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jonash):

* cc: jonas-django@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/21013#comment:6>

Django

unread,
Sep 7, 2013, 3:53:54 PM9/7/13
to django-...@googlegroups.com
#21013: Admin history should consider ModelAdmin.get_queryset
-------------------------------------+-------------------------------------
Reporter: jonash | Owner: jcatalan
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
Has patch: 1 | checkin
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 1
| UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Julien Phalip <jphalip@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"04415bf81b2440a08fc224e6c481bcb5840bbcbc"]:
{{{
#!CommitTicketReference repository=""
revision="04415bf81b2440a08fc224e6c481bcb5840bbcbc"
Fixed #21013 -- Ensure that ModelAdmin.get_queryset is considered for the
admin history view.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21013#comment:7>

Reply all
Reply to author
Forward
0 new messages