Kaydet (Commit) 40fb6a56 authored tarafından Florian Apolloner's avatar Florian Apolloner

Revert "Fixed #23088 -- Used `six` `range` type in `Paginator.page_range`."

This reverts commit 6508db2f.

Refs #23088.
üst 6e77acc5
......@@ -96,7 +96,7 @@ class Paginator(object):
Returns a 1-based range of pages for iterating through within
a template for loop.
"""
return six.moves.range(1, self.num_pages + 1)
return range(1, self.num_pages + 1)
page_range = property(_get_page_range)
......
......@@ -232,13 +232,6 @@ class PaginationTests(unittest.TestCase):
self.assertEqual(page2.previous_page_number(), 1)
self.assertIsNone(page2.next_page_number())
def test_page_range_type(self):
"""
Ticket #23088: Paginator.page_range is of inconsistent type in Py2/Py3
"""
paginator = Paginator([1, 2, 3], 2)
self.assertEqual(type(paginator.page_range), six.moves.range)
class ModelPaginationTests(TestCase):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment