From patchwork Mon Aug 24 18:23:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 510243 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 671771402A0 for ; Tue, 25 Aug 2015 04:29:28 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4D1F11A1D9D for ; Tue, 25 Aug 2015 04:29:28 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lists.ozlabs.org (Postfix) with ESMTP id A14581A1CF2 for ; Tue, 25 Aug 2015 04:24:26 +1000 (AEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Aug 2015 11:24:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,739,1432623600"; d="scan'208";a="789969346" Received: from smarupud-mobl2.amr.corp.intel.com (HELO strange.amr.corp.intel.com) ([10.254.186.249]) by fmsmga002.fm.intel.com with ESMTP; 24 Aug 2015 11:24:25 -0700 From: Damien Lespiau To: patchwork@lists.ozlabs.org Subject: [PATCH 31/51] paginator: Tweak the number of pages shown Date: Mon, 24 Aug 2015 19:23:20 +0100 Message-Id: <1440440620-25937-32-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1440440620-25937-1-git-send-email-damien.lespiau@intel.com> References: <1440440620-25937-1-git-send-email-damien.lespiau@intel.com> MIME-Version: 1.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Bel=C3=A9n=20Barros=20Pe=C3=B1a?= Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" From: Belén Barros Peña 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 --- patchwork/paginator.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patchwork/paginator.py b/patchwork/paginator.py index 31c0190..286372f 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/