Skip to content

Commit

Permalink
Merge 979f76f into d077d53
Browse files Browse the repository at this point in the history
  • Loading branch information
joaolsilva committed Feb 3, 2016
2 parents d077d53 + 979f76f commit 0b5ab8e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zinnia/templatetags/zinnia.py
Expand Up @@ -280,9 +280,9 @@ def zinnia_pagination(context, page, begin_pages=1, end_pages=1,
if key != 'page':
GET_string += '&%s=%s' % (key, value)

begin = list(page.paginator.page_range[:begin_pages])
end = list(page.paginator.page_range[-end_pages:])
middle = list(page.paginator.page_range[
begin = list(list(page.paginator.page_range)[:begin_pages])
end = list(list(page.paginator.page_range)[-end_pages:])
middle = list(list(page.paginator.page_range)[
max(page.number - before_pages - 1, 0):page.number + after_pages])

if set(begin) & set(middle): # [1, 2, 3], [2, 3, 4], [...]
Expand Down

0 comments on commit 0b5ab8e

Please sign in to comment.