Ticket #4926: ticket_4926_changelist_multifield_ordering.diff
| File ticket_4926_changelist_multifield_ordering.diff, 0.7 kB (added by Eric B <ebartels@gmail.com>, 7 months ago) |
|---|
-
a/django/contrib/admin/views/main.py
old new 225 225 # manually-specified ordering from the query string. 226 226 ordering = self.model_admin.ordering or lookup_opts.ordering or ['-' + lookup_opts.pk.name] 227 227 228 if ordering[0].startswith('-'): 228 if len(ordering) > 1: 229 order_field, order_type = '', '' 230 elif ordering[0].startswith('-'): 229 231 order_field, order_type = ordering[0][1:], 'desc' 230 232 else: 231 233 order_field, order_type = ordering[0], 'asc'
