Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#13862 closed (fixed)

InlineModelAdmin does not respect ordering

Reported by: Simon Meers Owned by: Greg Turner
Component: contrib.admin Version: dev
Severity: Keywords: InlineModelAdmin, inline, ordering, sprintdec2010
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

ModelAdmin has an ordering option which ought to be inherited by InlineModelAdmin -- in many situations it is useful to specify a custom ordering criteria for inlines. I've attached a patch which moves the ordering attribute and queryset method should to BaseModelAdmin so that the functionality is shared with InlineModelAdmin.

Attachments (3)

inline_queryset_ordering.diff (2.4 KB ) - added by Simon Meers 14 years ago.
inline_queryset_ordering_2.diff (6.3 KB ) - added by rasca 14 years ago.
added docs and tests
inline_queryset_ordering_2_and_docs_correction.diff (9.2 KB ) - added by Greg Turner 14 years ago.
Added docs corrections from #14816.

Download all attachments as: .zip

Change History (11)

by Simon Meers, 14 years ago

comment:1 by Daniel F Moisset, 14 years ago

Needs documentation: set
Needs tests: set
Owner: changed from Simon Meers to Daniel F Moisset
Triage Stage: UnreviewedAccepted

Accepting this; however inlines should explicitly document that these new options are available

comment:2 by Daniel F Moisset, 14 years ago

Owner: changed from Daniel F Moisset to nobody

comment:3 by rasca, 14 years ago

Needs documentation: unset
Needs tests: unset
Triage Stage: AcceptedReady for checkin

The patch works fine for me, added docs, tests and marking it RFC

by rasca, 14 years ago

added docs and tests

comment:4 by Greg Turner, 14 years ago

Owner: changed from nobody to Greg Turner

by Greg Turner, 14 years ago

Added docs corrections from #14816.

comment:5 by Greg Turner, 14 years ago

Keywords: sprintdec2010 added

I've updated the docs to reflect the corrections in #14816. Some InlineModelAdmin attributes had duplicate docs to ModelAdmin; these are changed to links for consistency.

in reply to:  5 comment:6 by Greg Turner, 14 years ago

Replying to cogat:

I've updated the docs to reflect the corrections in #14816. Some InlineModelAdmin attributes had duplicate docs to ModelAdmin; these are changed to links for consistency.

#14816 is closed in favour of the patch here.

comment:7 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [14882]) Fixed #13862 -- Added an ordering option to InlineModelAdmin and cleaned up documentation for it a bit. Thanks, Simon Meers, rasca and cogat.

comment:8 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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