Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Adrian Holovaty authored November 28, 2005

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  django/views/generic/list_detail.py
6  django/views/generic/list_detail.py
@@ -7,7 +7,7 @@
7 7
 from django.core.exceptions import Http404, ObjectDoesNotExist
8 8
 
9 9
 def object_list(request, app_label, module_name, paginate_by=None, allow_empty=False,
10  
-                template_name=None, template_loader=template_loader, 
  10
+                template_name=None, template_loader=template_loader,
11 11
                 extra_lookup_kwargs={}, extra_context={}):
12 12
     """
13 13
     Generic list of objects.
@@ -50,7 +50,7 @@ def object_list(request, app_label, module_name, paginate_by=None, allow_empty=F
50 50
         page = int(page)
51 51
         c = Context(request, {
52 52
             'object_list': object_list,
53  
-            'is_paginated': True,
  53
+            'is_paginated': paginator.pages > 1,
54 54
             'results_per_page': paginate_by,
55 55
             'has_next': paginator.has_next_page(page),
56 56
             '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
80 80
 
81 81
 def object_detail(request, app_label, module_name, object_id=None, slug=None,
82 82
                   slug_field=None, template_name=None, template_name_field=None,
83  
-                  template_loader=template_loader, extra_lookup_kwargs={}, 
  83
+                  template_loader=template_loader, extra_lookup_kwargs={},
84 84
                   extra_context={}):
85 85
     """
86 86
     Generic list of objects.

0 notes on commit 496e777

Please sign in to comment.
Something went wrong with that request. Please try again.