Opened 13 years ago

Closed 13 years ago

#15629 closed Bug (duplicate)

django admin does not use ordering for foreign keys dropdown

Reported by: Brillgen Developers Owned by: nobody
Component: contrib.admin Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Versions: Admin of 1.2 as well as the 1.3 RC
Conditions:Model 2 has FK to Model 1. Model 1 has an ordering parameter (used in list display).

Expected Behavior: ordering should be used for showing the dropdown in Model 2
Acual Behaviour: dropdown in Model 2 for items in Model 1 shows in model meta sorting order

Reason: if the model meta sort order is used all queries have an extra overhead. Since the admin is just using an ordering parameter that it itself uses for the list display, there is no overhead or incongruity.

This can always be an additional parameter of course.

I would be happy to try and submit a patch against the 1.3rc as long as the community can bless this as a valid bug/enhancement that will be accepted into django main.

Change History (4)

comment:1 by Russell Keith-Magee, 13 years ago

milestone: 1.3
Triage Stage: UnreviewedAccepted

This isn't going to get into 1.3 -- we're trying to stabilize so that we can make a release, and this is a minor annoyance that has (evidently) existed for a long time.

However, it sounds like a reasonable complaint; a patch would certainly be welcome.

comment:2 by Luke Plant, 13 years ago

Type: Bug

comment:3 by Luke Plant, 13 years ago

Severity: Normal

comment:4 by Julien Phalip, 13 years ago

Resolution: duplicate
Status: newclosed

Dupe of #6585.

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