#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)
Change History (11)
by , 15 years ago
| Attachment: | inline_queryset_ordering.diff added | 
|---|
comment:1 by , 15 years ago
| Needs documentation: | set | 
|---|---|
| Needs tests: | set | 
| Owner: | changed from to | 
| Triage Stage: | Unreviewed → Accepted | 
comment:2 by , 15 years ago
| Owner: | changed from to | 
|---|
comment:3 by , 15 years ago
| Needs documentation: | unset | 
|---|---|
| Needs tests: | unset | 
| Triage Stage: | Accepted → Ready for checkin | 
The patch works fine for me, added docs, tests and marking it RFC
comment:4 by , 15 years ago
| Owner: | changed from to | 
|---|
by , 15 years ago
| Attachment: | inline_queryset_ordering_2_and_docs_correction.diff added | 
|---|
Added docs corrections from #14816.
follow-up: 6 comment:5 by , 15 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.
comment:6 by , 15 years ago
comment:7 by , 15 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
Accepting this; however inlines should explicitly document that these new options are available