Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#389 closed enhancement (invalid)

[patch] admin interface only sorts by first ordering field

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


I have added an ordering attribute to a model with two field names:

ordering = ["crate", "card"]

I find that get_list() on the model sorts by "crate", then "card", as I expect. However, when I look at the list of objects in the admin interface, it only sorts by "crate" and not both "crate" and "card".

Attachments (1)

389.diffs (4.5 KB) - added by dcf 8 years ago.
Diffs for magic-removal branch

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago by brovienas@…

I have encountered the same thing. I am using MySQL

Changed 8 years ago by dcf

Diffs for magic-removal branch

comment:2 Changed 8 years ago by dcf

  • Summary changed from admin interface only sorts by first ordering field to [patch] admin interface only sorts by first ordering field

Added patch for this issue.

comment:3 Changed 8 years ago by anonymous

  • Cc dcf@… added

comment:4 Changed 8 years ago by jacob

  • milestone set to Version 1.1
  • priority changed from normal to low
  • Type changed from defect to enhancement

The added patch breaks the changelist view (in django.db.models.handle_legacy_ordering).

comment:5 Changed 8 years ago by jacob

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

The patch still breaks the changelist view, and since it hasn't been updated I'm marking this INVALID.

comment:6 Changed 7 years ago by anonymous

Milestone Version 1.1 deleted

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.