Code

Ticket #3264: respect_model_ordering.diff

File respect_model_ordering.diff, 463 bytes (added by paolo <paolo@…>, 8 years ago)

respect ordering specified in the model

Line 
1Index: date_based.py
2===================================================================
3--- date_based.py       (revision 4285)
4+++ date_based.py       (working copy)
5@@ -76,7 +76,7 @@
6     if not date_list and not allow_empty:
7         raise Http404
8     if make_object_list:
9-        object_list = queryset.filter(**lookup_kwargs).order_by(date_field)
10+        object_list = queryset.filter(**lookup_kwargs)
11     else:
12         object_list = []
13     if not template_name: