From: Belén Barros Peña Date: Thu, 9 Oct 2014 09:23:15 +0000 (+0100) Subject: paginator: Tweak the number of pages shown X-Git-Tag: v1.1.0~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b866ff154766f2a8a6daf92374989d149f1872e;p=thirdparty%2Fpatchwork.git paginator: Tweak the number of pages shown We don't really need that many pages displayed in the pagination, tweak the numbers down a bit. Signed-off-by: Belén Barros Peña Signed-off-by: Damien Lespiau Acked-by: Stephen Finucane --- diff --git a/patchwork/paginator.py b/patchwork/paginator.py index 31c01905..286372f9 100644 --- a/patchwork/paginator.py +++ b/patchwork/paginator.py @@ -23,10 +23,12 @@ from django.conf import settings DEFAULT_PATCHES_PER_PAGE = 100 LONG_PAGE_THRESHOLD = 30 -LEADING_PAGE_RANGE_DISPLAYED = TRAILING_PAGE_RANGE_DISPLAYED = 10 -LEADING_PAGE_RANGE = TRAILING_PAGE_RANGE = 8 +LEADING_PAGE_RANGE_DISPLAYED = 4 +TRAILING_PAGE_RANGE_DISPLAYED = 2 +LEADING_PAGE_RANGE = 4 +TRAILING_PAGE_RANGE = 2 NUM_PAGES_OUTSIDE_RANGE = 2 -ADJACENT_PAGES = 4 +ADJACENT_PAGES = 1 # parts from: # http://blog.localkinegrinds.com/2007/09/06/digg-style-pagination-in-django/