Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#13862 closed (fixed)

InlineModelAdmin does not respect ordering

Reported by: Simon Meers Owned by: Greg Turner
Component: contrib.admin Version: master
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 6 years ago.
inline_queryset_ordering_2.diff (6.3 KB) - added by rasca 6 years ago.
added docs and tests
inline_queryset_ordering_2_and_docs_correction.diff (9.2 KB) - added by Greg Turner 6 years ago.
Added docs corrections from #14816.

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by Simon Meers

comment:1 Changed 6 years ago by dmoisset

Needs documentation: set
Needs tests: set
Owner: changed from Simon Meers to dmoisset
Triage Stage: UnreviewedAccepted

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

comment:2 Changed 6 years ago by dmoisset

Owner: changed from dmoisset to nobody

comment:3 Changed 6 years ago by rasca

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

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

Changed 6 years ago by rasca

added docs and tests

comment:4 Changed 6 years ago by Greg Turner

Owner: changed from nobody to Greg Turner

Changed 6 years ago by Greg Turner

Added docs corrections from #14816.

comment:5 Changed 6 years ago by Greg Turner

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.

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

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 Changed 6 years ago by Jannis Leidel

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 Changed 5 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

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