Ticket #3181: list_detail.patch
File list_detail.patch, 1019 bytes (added by , 18 years ago) |
---|
-
Users/andrew/clownfish/django_src/django/views/generic/list_detail.py
3 3 from django.core.xheaders import populate_xheaders 4 4 from django.core.paginator import ObjectPaginator, InvalidPage 5 5 from django.core.exceptions import ObjectDoesNotExist 6 from django.db.models.query import QuerySet 6 7 7 8 def object_list(request, queryset, paginate_by=None, page=None, 8 9 allow_empty=False, template_name=None, template_loader=loader, … … 35 36 number of objects, total 36 37 """ 37 38 if extra_context is None: extra_context = {} 38 queryset = queryset._clone()39 if isinstance(queryset, QuerySet): queryset = queryset._clone() 39 40 if paginate_by: 40 41 paginator = ObjectPaginator(queryset, paginate_by) 41 42 if not page: