--
Ticket URL: <https://code.djangoproject.com/ticket/32876>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
* component: Uncategorized => contrib.admin
Comment:
Thanks for the report, however I don't see any issue here. `all` in the
changelist filters are achieved by removing previous filters from the
query string so there is nothing to preserve, in the 7th step a changelist
will display all records as expected. If you're having trouble
understanding how Django works, see
TicketClosingReasons/UseSupportChannels for ways to get help.
--
Ticket URL: <https://code.djangoproject.com/ticket/32876#comment:1>
Old description:
> 1. Login in django admin
> 2. Enter a changelist page of model
> 3. Order by a column in changelist page
> 4. Display all in changelist page
> 5. Enter change form page
> 6. Save
> 7. The order is keeped but `all` is disappeared
New description:
1. Login in django admin
2. Enter a changelist page of model
3. Order by a column in changelist page
4. Display all in changelist page
5. Enter change form page
6. Save
7. The order is kept but `all` is disappeared
--
Comment (by A-hông):
`q`(query), `o`(order) and `all`(display all) can be set at the same time.
`q`(query) and `o`(order) are kept but `all`(display all) not, when from
change form back to changelist.
`all` should be kept in the fillter of changelist.
I found
[https://github.com/django/django/blob/1bbb98d9a4b7d83e422b14ae2429cb368eff5a13/django/contrib/admin/templatetags/admin_urls.py#L42
parse_qsl in admin_urls.py] will remove the keys which has no value.
> from urllib.parse import parse_qsl, unquote, urlparse, urlunparse
> parse_qsl('q=2&all=')
> => [('q', '2')]
It is why `all`(display all) cannot be kept.
--
Ticket URL: <https://code.djangoproject.com/ticket/32876#comment:2>