[Django] #29456: Django 1.11 same filter_list get redisplayed in different model admin page

6 views
Skip to first unread message

Django

unread,
May 30, 2018, 2:59:19 AM5/30/18
to django-...@googlegroups.com
#29456: Django 1.11 same filter_list get redisplayed in different model admin page
-----------------------------------------+-----------------------------
Reporter: grpoundblue | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 1.11
Severity: Normal | Keywords: list_filter
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+-----------------------------
I'm getting this behavior after updating Django from 1.8 to 1.11.

{{{

modelAAdmin(admin.ModelAdmin)
list_filter = ('filter_a',)

modelBAdmin(admin.ModelAdmin)
list_filter = ('filter_b',)
}}}

If I navigate to modelA admin page first and than move to modelB admin
page the filters defined in modelA are displayed instead of the modelB's
one.
Making a selection on the wrongly displayed filter appends ** ?e=1** and
no error displayed.
This also happen if there is more than two model admin classes.

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

Django

unread,
May 30, 2018, 4:13:09 AM5/30/18
to django-...@googlegroups.com
#29456: Django 1.11 same filter_list get redisplayed in different model admin page
-------------------------------+--------------------------------------
Reporter: grpoundblue | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: list_filter | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Carlton Gibson):

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


Comment:

Hi @grpoundblue.

This needs extra info as is — I can't reproduce it. Can you provide a
minimal steps to reproduce or test project that demonstrates the issue?

Thanks.

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

Django

unread,
Jun 18, 2018, 4:49:47 PM6/18/18
to django-...@googlegroups.com
#29456: Django 1.11 same filter_list get redisplayed in different model admin page
-------------------------------+--------------------------------------
Reporter: grpoundblue | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution: needsinfo

Keywords: list_filter | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by grpoundblue):

Finally I was able to get rid of this weird behavior, honestly without
investigating further. However I put this here hopefully someone can
figure it out the exact cause.
I had a custom template for change_list.html like below, the motivation
was to increase performance in page loading :

{{{
PROJECT_HOME/myapp/templates/admin/myapp/change_list.html
}}}

The file's content was :

{{{
{% extends "admin/change_list.html" %}
{% load admin_list i18n cache %}

{% block filters %}
<!-- BETTER FILTER, date doesn't change a lot -->
{% cache 300 admin_filters request.GET.items request.path
request.user.username %}
{% if cl.has_filters %}
<div id="grp-filters" class="grp-module grp-filter testTEST">
<h2>{% trans 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec
%}{% endfor %}
</div>
{% endif %}
{% endcache %}
{% endblock %}
}}}


So I just removed this custom template.

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

Django

unread,
Jun 18, 2018, 7:11:28 PM6/18/18
to django-...@googlegroups.com
#29456: Django 1.11 same filter_list get redisplayed in different model admin page
-------------------------------+--------------------------------------
Reporter: grpoundblue | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 1.11
Severity: Normal | Resolution: invalid

Keywords: list_filter | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Tim Graham):

* resolution: needsinfo => invalid


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

Reply all
Reply to author
Forward
0 new messages