Ensured that Paginator.page_range works the same on Python 2 and 3.

This somewhat fixes #23088, refs 23140.
This commit is contained in:
Florian Apolloner 2014-08-03 21:10:00 +02:00
parent 40fb6a5601
commit 2d542bf60c
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class Paginator(object):
Returns a 1-based range of pages for iterating through within Returns a 1-based range of pages for iterating through within
a template for loop. 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) page_range = property(_get_page_range)