[Django] #32876: The parametered `all` is not preserved after save object in django admin.

7 views
Skip to first unread message

Django

unread,
Jun 23, 2021, 5:17:19 AM6/23/21
to django-...@googlegroups.com
#32876: The parametered `all` is not preserved after save object in django admin.
-----------------------------------------+------------------------
Reporter: A-hông | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
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

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

Django

unread,
Jun 23, 2021, 5:53:31 AM6/23/21
to django-...@googlegroups.com
#32876: The parametered `all` is not preserved after save object in django admin.
-------------------------------+--------------------------------------
Reporter: A-hông | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | 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 Mariusz Felisiak):

* 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>

Django

unread,
Jun 23, 2021, 10:07:03 PM6/23/21
to django-...@googlegroups.com
#32876: The parametered `all` is not preserved after save object in django admin.
-------------------------------+--------------------------------------
Reporter: A-hông | Owner: nobody

Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | 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
-------------------------------+--------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages