pirave / django-pagination

Automatically exported from code.google.com/p/django-pagination
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

The PAGINATION_DEFAULT_WINDOW setting isn't used symmetrically #74

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
If you page to somewhere in the middle of several results, you might see 
something like this:

 ‹‹ previous  1  2  ... 565  566  *567*  568  ... 2027  2028  next ››

with asterisks marking the current page. Notice that there are two page links 
rendered before 567, but only one after before the ellipses. (For this example, 
I set PAGINATION_DEFAULT_WINDOW = 2). To fix it, I changed this line:

current_end = page_obj.number-1+window

to:

current_end = page_obj.number+window

in the paginate() method in templatetags/pagination_tags.py. Let me know if 
there's any way I can help!

Original issue reported on code.google.com by ra...@electronsweatshop.com on 5 Oct 2010 at 5:33

GoogleCodeExporter commented 8 years ago
This fix helped me. Please commit it.

Original comment by tezro...@gmail.com on 30 Oct 2011 at 1:35