Opened 18 years ago
Closed 13 years ago
#2679 closed Bug (fixed)
Admin.ordering isn't working for edit_inline ForeignKey fields
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | |
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
Note: I've only tested this with "backward" foreign keys. This does work with Meta.ordering but I don't want this ordering to happen on queries outside of the admin so I moved the ordering property to the "class Admin" and the ordering isn't working. I've verified that the SQL queries are not adding the "ORDER BY" clause by adding this to the admin base.html template:
<!-- SQL Queries -->
<!--
{% for s in sql_queries %}
SQL: {{ s.sql }}
TIME: {{ s.time }}
{% endfor %}
-->
If a test case is needed I could provide a simple model for this.
Change History (4)
comment:1 by , 18 years ago
Summary: | Admin.ordering isn't working for inlined ForeignKey relationships → Admin.ordering isn't working for edit_inline ForeignKey fields |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Severity: | normal → Normal |
---|---|
Type: | defect → Bug |
comment:4 by , 13 years ago
Easy pickings: | unset |
---|---|
Resolution: | → fixed |
Status: | new → closed |
UI/UX: | unset |
Closing as fixed as per Ramiro's comment.
Ability to respect its own ordering option was added to InlineModelAdmin (and children) in r14882 so I'm closing this ticket as fixed although it reported the issue against to the equivalent inline implementation available at that time (inner Admin class).