Ticket #7005: object_list-orphans-support.diff
File object_list-orphans-support.diff, 1.0 KB (added by , 17 years ago) |
---|
-
views/generic/list_detail.py
5 5 from django.core.exceptions import ObjectDoesNotExist 6 6 7 7 def object_list(request, queryset, paginate_by=None, page=None, 8 allow_empty=True, template_name=None, template_loader=loader,8 allow_empty=True, orphans=None, template_name=None, template_loader=loader, 9 9 extra_context=None, context_processors=None, template_object_name='object', 10 10 mimetype=None): 11 11 """ … … 45 45 if extra_context is None: extra_context = {} 46 46 queryset = queryset._clone() 47 47 if paginate_by: 48 paginator = QuerySetPaginator(queryset, paginate_by, allow_empty_first_page=allow_empty )48 paginator = QuerySetPaginator(queryset, paginate_by, allow_empty_first_page=allow_empty, orphans=orphans) 49 49 if not page: 50 50 page = request.GET.get('page', 1) 51 51 try: