Opened 9 years ago

Closed 9 years ago

#947 closed defect (fixed)

[patch] is_paginated is true when number of pages is 1

Reported by: Nebojša Đorđević - nesh <nesh@…> Owned by: jacob
Component: Generic views Version:
Severity: normal Keywords:
Cc: nesh@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Index: /store/django/django/views/generic/list_detail.py
===================================================================
--- /store/django/django/views/generic/list_detail.py   (revision 1474)
+++ /store/django/django/views/generic/list_detail.py   (working copy)
@@ -50,7 +50,7 @@
         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),

Change History (2)

comment:1 Changed 9 years ago by Nebojša Đorđević - nesh <nesh@…>

  • Cc nesh@… added

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1478]) Fixed #947 -- Corrected is_paginated variable in list_detail generic view. Thanks, nesh

Note: See TracTickets for help on using tickets.
Back to Top