mirror of
https://github.com/django/django.git
synced 2025-06-08 13:09:13 +00:00
[1.7.x] Ensured that Paginator.page_range works the same on Python 2 and 3.
This somewhat fixes #23088, refs 23140. Backport of 2d542bf60cc37c59872c5a20d6af3bf826038739 from master.
This commit is contained in:
parent
23b0d636d3
commit
1cb919e408
@ -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)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user