From 493d48bccaa19b34ae2c62187eb190f5338a1a86 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Mon, 13 Mar 2017 23:32:06 +0100 Subject: [PATCH] Pagination length in settings --- counter/views.py | 2 +- sith/settings.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/counter/views.py b/counter/views.py index 5fd114ff..a703ae03 100644 --- a/counter/views.py +++ b/counter/views.py @@ -939,7 +939,7 @@ class CashSummaryListView(CanEditPropMixin, CounterAdminTabsMixin, ListView): context_object_name = "cashsummary_list" current_tab = "cash_summary" queryset = CashRegisterSummary.objects.all().order_by('-date') - paginate_by = 10 + paginate_by = settings.SITH_COUNTER_CASH_SUMMARY_LENGTH def get_context_data(self, **kwargs): """ Add sums to the context """ diff --git a/sith/settings.py b/sith/settings.py index 042e3114..2c9298f1 100644 --- a/sith/settings.py +++ b/sith/settings.py @@ -357,6 +357,9 @@ SITH_COUNTER_BANK = [ ('LA-POSTE', 'La Poste'), ] +# Defines pagination for cash summary +SITH_COUNTER_CASH_SUMMARY_LENGTH = 50 + # Defines which product type is the refilling type, and thus increases the account amount SITH_COUNTER_PRODUCTTYPE_REFILLING = 11