Ticket #7005: object_list-orphans-support.diff

File object_list-orphans-support.diff, 1.0 KB (added by shadfc, 17 years ago)

patch against rev 7412 adding orphans support to object_list

  • views/generic/list_detail.py

     
    55from django.core.exceptions import ObjectDoesNotExist
    66
    77def 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,
    99        extra_context=None, context_processors=None, template_object_name='object',
    1010        mimetype=None):
    1111    """
     
    4545    if extra_context is None: extra_context = {}
    4646    queryset = queryset._clone()
    4747    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)
    4949        if not page:
    5050            page = request.GET.get('page', 1)
    5151        try:
Back to Top