#17522: ModelAdmin.ordering validation too strict
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  nobody
  sebastian              |     Status:  new
         Type:  Bug      |    Version:  SVN
    Component:           |   Keywords:  admin, validation, ordering, strict
  contrib.admin          |  Has patch:  1
     Severity:  Normal   |      UI/UX:  0
 Triage Stage:           |
  Unreviewed             |
Easy pickings:  0        |
-------------------------+-------------------------------------------------
 `ModelAdmin.ordering` checks whether all elements are the names of valid
 fields on the model. This is too strict as we can also define methods on
 the model or admin class and set `admin_order_field`. In fact, if such
 columns are used in `list_display` they are sortable by clicking on the
 corresponding column in the change list view.

 The attached patch relaxes the admin validation so that the names of such
 methods are allowed for the default sorting. It also adds several tests to
 check this relaxed validation.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17522>
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