Opened 10 days ago

Last modified 8 days ago

#35747 closed Bug

Admin change list doesn't redirect to default ordering when the last ordering field is removed from sorting — at Version 1

Reported by: ldeluigi Owned by:
Component: contrib.admin Version: 5.1
Severity: Normal Keywords: admin change list ordering sorting sortremove
Cc: ldeluigi Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by ldeluigi)

Basically, when an admin maually clicks on the sortremove link of the last remaining field in the sorting query variable, the redirect points to an empty string.

For example, if the query parameter is the default o, the redirect points to /?o=, which results in the change list not being ordered at all. Instead, I'm claiming that users would expect to see the same ordering they experience when landing on the change list page in the first place, which was the default ordering, only visible when the ordering parameter is absent from the sortremove query.

For this reason, I'd like the sortremove to redirect to / instead of /?o= when the last ordering field would be removed.

I'm opening a PR that *should* do the job: https://github.com/django/django/pull/18558

Change History (1)

comment:1 by ldeluigi, 10 days ago

Description: modified (diff)

added link to pr

Note: See TracTickets for help on using tickets.
Back to Top