Browse Source

Fix to smart_pagination

Signed-off-by: Luciano Almeida <lucianoalmeida@interlegis.leg.br>
pull/6/head
Luciano Almeida 9 years ago
committed by Luciano Almeida
parent
commit
6eb7aca2f5
  1. 2
      sigi/apps/home/templatetags/smart_pagination.py

2
sigi/apps/home/templatetags/smart_pagination.py

@ -29,7 +29,7 @@ def smart_paginator(page_obj, querystring=None):
else:
querystring = '?'
page_range = page_obj.paginator.page_range
page_range = list(page_obj.paginator.page_range)
mid = len(page_range) / 2
range = list(set(page_range[:3]) | set(page_range[mid-2:mid+1]) | set(page_range[-3:]) |

Loading…
Cancel
Save