Show More
@@ -40,7 +40,7 b' class DividedPaginator(Paginator):' | |||
|
40 | 40 | end = min(self.num_pages - self.lookaround_size, index + self.lookaround_size + 1) |
|
41 | 41 | return self.page_range[start:end] |
|
42 | 42 | |
|
43 | def get_divided_range(self): | |
|
43 | def _get_divided_range(self): | |
|
44 | 44 | dr = list() |
|
45 | 45 | |
|
46 | 46 | dr += self._left_range() |
@@ -53,11 +53,11 b' class DividedPaginator(Paginator):' | |||
|
53 | 53 | |
|
54 | 54 | return dr |
|
55 | 55 | |
|
56 | def get_dividers(self): | |
|
56 | def get_dividers(self, divided_range): | |
|
57 | 57 | dividers = [] |
|
58 | 58 | |
|
59 | 59 | prev_page = 1 |
|
60 |
for page in |
|
|
60 | for page in divided_range: | |
|
61 | 61 | if page - prev_page > 1: |
|
62 | 62 | dividers.append(page) |
|
63 | 63 | |
@@ -91,8 +91,9 b' class DividedPaginator(Paginator):' | |||
|
91 | 91 | def get_page_url_list(self): |
|
92 | 92 | output = [] |
|
93 | 93 | |
|
94 |
divide |
|
|
95 |
|
|
|
94 | divided_range = self._get_divided_range() | |
|
95 | dividers = self.get_dividers(divided_range) | |
|
96 | for page in divided_range: | |
|
96 | 97 | if page in dividers: |
|
97 | 98 | output.append('...') |
|
98 | 99 |
General Comments 0
You need to be logged in to leave comments.
Login now