#19182 backport request

95 views
Skip to first unread message

Chris Wilson

unread,
Feb 14, 2014, 7:53:21 AM2/14/14
to Django Developers
Hi all,

I just ran into bug #19182 <https://code.djangoproject.com/ticket/19182>:

ModelAdmin filtering didn't work when list_filter includes a ('fieldname',
ClassName) tuple, but throws a SuspiciousOperation exception instead. The
ChangeList would display fine, but as soon as you tried to use it, it
would throw a SuspiciousOperation exception, because it hadn't correctly
added 'fieldname' to the list of valid filters.

This bug is already fixed in trunk, but I don't think it's been backported
to 1.6.x. At least, I don't see the fix in the lookup_allowed() method at
<https://github.com/django/django/blob/stable/1.6.x/django/contrib/admin/options.py>.

Since the documentation for 1.6 says that this should work
<https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter>
but it actually doesn't in 1.6, please would you consider backporting this
fix to the 1.6 stable branch?

Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Citylife House, Sturton Street, Cambridge, CB1 2QF, UK

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

Florian Apolloner

unread,
Feb 14, 2014, 10:36:44 AM2/14/14
to django-d...@googlegroups.com
Hi,

as Tim noted on the ticket, we are not going to backport this as per our policy.

Cheers,
Florian

Chris Wilson

unread,
Feb 14, 2014, 10:41:07 AM2/14/14
to django-d...@googlegroups.com
Hi all,

On Fri, 14 Feb 2014, Florian Apolloner wrote:

> as Tim noted on the ticket, we are not going to backport this as per our
> policy.

In that case will you accept patches to remove description of the
broken feature from the documentation for 1.4, 1.5 and 1.6?

Tim Graham

unread,
Feb 14, 2014, 11:29:43 AM2/14/14
to django-d...@googlegroups.com
I sympathize with your frustration. On the other hand as we have over 500 bugs in Trac, and I'm not sure starting to accept documentation requests for them is the best use of our resources. I'm not sure the feature is really completely broken enough to warrant removing it from the docs?

Chris Wilson

unread,
Feb 14, 2014, 12:49:26 PM2/14/14
to django-d...@googlegroups.com
Hi Tim,

On Fri, 14 Feb 2014, Tim Graham wrote:

> I sympathize with your frustration. On the other hand as we have over
> 500 bugs in Trac, and I'm not sure starting to accept documentation
> requests for them is the best use of our resources. I'm not sure the
> feature is really completely broken enough to warrant removing it from
> the docs?

I'm afraid that the documented feature is totally broken. It cannot work,
unless you override ModelAdmin.lookup_allowed() in your own admin and add
the fields manually, filter parameters to the returned set.

I can submit a documentation patch if necessary, so someone would just
have to approve it.

Florian Apolloner

unread,
Feb 14, 2014, 1:39:17 PM2/14/14
to django-d...@googlegroups.com
On Friday, February 14, 2014 6:49:26 PM UTC+1, Chris Wilson wrote:
I'm afraid that the documented feature is totally broken.

I have to disagree, the feature works as advertised as long as you don't use the combination of a custom filter and span relations.

Regards,
Florian
Reply all
Reply to author
Forward
0 new messages