Ticket #2367: django_pagination.2.diff
File django_pagination.2.diff, 10.1 KB (added by , 17 years ago) |
---|
-
django/views/generic/date_based.py
from django.core.exceptions import ObjectDoesNotExist 6 6 from django.core.xheaders import populate_xheaders 7 7 from django.db.models.fields import DateTimeField 8 8 from django.http import Http404, HttpResponse 9 from django.core.paginator import QuerySetPaginator, InvalidPage 9 10 10 11 def archive_index(request, queryset, date_field, num_latest=15, 11 12 template_name=None, template_loader=loader, 12 13 extra_context=None, allow_empty=True, context_processors=None, 13 mimetype=None, allow_future=False, template_object_name='latest'): 14 mimetype=None, allow_future=False, template_object_name='latest', 15 paginate_by=None, page=None): 14 16 """ 15 17 Generic top-level archive of date-based objects. 16 18 … … def archive_index(request, queryset, date_field, num_latest=15, 20 22 List of years 21 23 latest 22 24 Latest N (defaults to 15) objects by date 25 paginator 26 paginator object 27 page_obj 28 page object 23 29 """ 24 30 if extra_context is None: extra_context = {} 25 31 model = queryset.model