Code

Opened 8 years ago

Closed 7 years ago

#2870 closed enhancement (invalid)

contrib.admin change_list reorders queryset

Reported by: davidschein@… Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The admin change_list orders the list by PK DESC in the absence of any other ordering directives. Why bother? Doing this overrides, for instance, any ordering that a custom default manager introduces.

The attached patch (somewhat heavy-handedly) leaves the manager's ordering in place if there is no other ordering found.

Attachments (1)

order.patch (1.4 KB) - added by davidschein@… 8 years ago.
patch

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by davidschein@…

patch

comment:1 Changed 7 years ago by David S. <davidschein@…>

  • Resolution set to invalid
  • Status changed from new to closed

This patch screws up regular single-column sorting in the Admin interface. Chuck it.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.