From 2d542bf60cc37c59872c5a20d6af3bf826038739 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Sun, 3 Aug 2014 21:10:00 +0200 Subject: [PATCH] Ensured that Paginator.page_range works the same on Python 2 and 3. This somewhat fixes #23088, refs 23140. --- django/core/paginator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/paginator.py b/django/core/paginator.py index c8b9377856..c72a6b0273 100644 --- a/django/core/paginator.py +++ b/django/core/paginator.py @@ -96,7 +96,7 @@ class Paginator(object): Returns a 1-based range of pages for iterating through within a template for loop. """ - return range(1, self.num_pages + 1) + return list(six.moves.range(1, self.num_pages + 1)) page_range = property(_get_page_range)