Ticket #5188: generic_views_no_explicit_ordering.diff
File generic_views_no_explicit_ordering.diff, 790 bytes (added by , 17 years ago) |
---|
-
django/views/generic/date_based.py
28 28 raise Http404, "No %s available" % model._meta.verbose_name 29 29 30 30 if date_list and num_latest: 31 latest = queryset .order_by('-'+date_field)[:num_latest]31 latest = queryset[:num_latest] 32 32 else: 33 33 latest = None 34 34 … … 76 76 if not date_list and not allow_empty: 77 77 raise Http404 78 78 if make_object_list: 79 object_list = queryset.filter(**lookup_kwargs) .order_by(date_field)79 object_list = queryset.filter(**lookup_kwargs) 80 80 else: 81 81 object_list = [] 82 82 if not template_name: