Opened 13 years ago
Closed 13 years ago
#16641 closed Bug (duplicate)
Ordering not used on ForeignKeyField form field RadioSelect widget
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.3 |
Severity: | Normal | Keywords: | admin, ordering, foreignkey |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I've spotted some inconsistency using the ordering option on Admin. By default, django.contrib.admin doesn't use the Admin ordering option when displaying a ForeignKeyField form field. However, when ordering is specified on model's Meta ordering option, the ordering appears.
Is that a bug or a feature ? Meaning : should the form field ordering follow the model's Meta definition, or should the admin's ordering option supersede the model's one ? (I thought about the later, thus this ticket.)
Example:
User(models.Model): class Meta: ordering = ('username', ) -> sort RadioSelect widget by username UserAdmin(admin.ModelAdmin): ordering = ('username', ) -> sort only list view by username
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This was already reported in #6585.
Edit
Thanks for reviewing.