2 >>> from django.core.paginator import Paginator
3 >>> from pagination.templatetags.pagination_tags import paginate
5 >>> p = Paginator(range(15), 2)
6 >>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
7 [1, 2, 3, 4, 5, 6, 7, 8]
9 >>> p = Paginator(range(17), 2)
10 >>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
11 [1, 2, 3, 4, 5, 6, 7, 8, 9]
13 >>> p = Paginator(range(19), 2)
14 >>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
15 [1, 2, 3, 4, None, 7, 8, 9, 10]
17 >>> p = Paginator(range(21), 2)
18 >>> paginate({'paginator': p, 'page_obj': p.page(1)})['pages']
19 [1, 2, 3, 4, None, 8, 9, 10, 11]