Ticket #3742: admin_order_fields_desc.diff
File admin_order_fields_desc.diff, 589 bytes (added by , 18 years ago) |
---|
-
admin_list.py
101 101 102 102 th_classes = [] 103 103 new_order_type = 'asc' 104 if field_name == cl.order_field: 104 order_field = getattr(getattr(cl.model, field_name, None), "admin_order_field", None) 105 if cl.order_field in (order_field, field_name): 105 106 th_classes.append('sorted %sending' % cl.order_type.lower()) 106 107 new_order_type = {'asc': 'desc', 'desc': 'asc'}[cl.order_type.lower()] 107 108