Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #947 -- Corrected is_paginated variable in list_detail generic …

…view. Thanks, nesh

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 496e777da974e6496a9e0f896825e314f72d59b6 1 parent 133839b
@adrianholovaty adrianholovaty authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 django/views/generic/list_detail.py
View
6 django/views/generic/list_detail.py
@@ -7,7 +7,7 @@
from django.core.exceptions import Http404, ObjectDoesNotExist
def object_list(request, app_label, module_name, paginate_by=None, allow_empty=False,
- template_name=None, template_loader=template_loader,
+ template_name=None, template_loader=template_loader,
extra_lookup_kwargs={}, extra_context={}):
"""
Generic list of objects.
@@ -50,7 +50,7 @@ def object_list(request, app_label, module_name, paginate_by=None, allow_empty=F
page = int(page)
c = Context(request, {
'object_list': object_list,
- 'is_paginated': True,
+ 'is_paginated': paginator.pages > 1,
'results_per_page': paginate_by,
'has_next': paginator.has_next_page(page),
'has_previous': paginator.has_previous_page(page),
@@ -80,7 +80,7 @@ def object_list(request, app_label, module_name, paginate_by=None, allow_empty=F
def object_detail(request, app_label, module_name, object_id=None, slug=None,
slug_field=None, template_name=None, template_name_field=None,
- template_loader=template_loader, extra_lookup_kwargs={},
+ template_loader=template_loader, extra_lookup_kwargs={},
extra_context={}):
"""
Generic list of objects.
Please sign in to comment.
Something went wrong with that request. Please try again.