#16641: Ordering not used on ForeignKeyField form field RadioSelect widget
-----------------------------------------+-------------------------------
 Reporter:  zyegfryed@…                  |          Owner:  nobody
     Type:  Bug                          |         Status:  new
Milestone:                               |      Component:  contrib.admin
  Version:  1.3                          |       Severity:  Normal
 Keywords:  admin, ordering, foreignkey  |   Triage Stage:  Unreviewed
Has patch:  0                            |  Easy pickings:  0
    UI/UX:  0                            |
-----------------------------------------+-------------------------------
 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
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16641>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to