Ticket #3181: list_detail.patch

File list_detail.patch, 1019 bytes (added by anonymous, 18 years ago)

Patch for list_detail

  • Users/andrew/clownfish/django_src/django/views/generic/list_detail.py

     
    33from django.core.xheaders import populate_xheaders
    44from django.core.paginator import ObjectPaginator, InvalidPage
    55from django.core.exceptions import ObjectDoesNotExist
     6from django.db.models.query import QuerySet
    67
    78def object_list(request, queryset, paginate_by=None, page=None,
    89        allow_empty=False, template_name=None, template_loader=loader,
     
    3536            number of objects, total
    3637    """
    3738    if extra_context is None: extra_context = {}
    38     queryset = queryset._clone()
     39    if isinstance(queryset, QuerySet): queryset = queryset._clone()
    3940    if paginate_by:
    4041        paginator = ObjectPaginator(queryset, paginate_by)
    4142        if not page:
Back to Top