Ticket #6127: admin-ordering.patch
File admin-ordering.patch, 699 bytes (added by , 17 years ago) |
---|
-
django/db/models/query.py
546 546 if "." in col_name: 547 547 table_prefix, col_name = col_name.split('.', 1) 548 548 table_prefix = qn(table_prefix) + '.' 549 if col_name.startswith('-'): 550 col_name = col_name[1:] 551 order = "DESC" 549 552 else: 550 553 # Use the database table as a column prefix if it wasn't given, 551 554 # and if the requested column isn't a custom SELECT.