Pagination length in settings

This commit is contained in:
Antoine Bartuccio 2017-03-13 23:32:06 +01:00
parent e4deacbe56
commit 493d48bcca
2 changed files with 4 additions and 1 deletions

View File

@ -939,7 +939,7 @@ class CashSummaryListView(CanEditPropMixin, CounterAdminTabsMixin, ListView):
context_object_name = "cashsummary_list" context_object_name = "cashsummary_list"
current_tab = "cash_summary" current_tab = "cash_summary"
queryset = CashRegisterSummary.objects.all().order_by('-date') queryset = CashRegisterSummary.objects.all().order_by('-date')
paginate_by = 10 paginate_by = settings.SITH_COUNTER_CASH_SUMMARY_LENGTH
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):
""" Add sums to the context """ """ Add sums to the context """

View File

@ -357,6 +357,9 @@ SITH_COUNTER_BANK = [
('LA-POSTE', 'La Poste'), ('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 # Defines which product type is the refilling type, and thus increases the account amount
SITH_COUNTER_PRODUCTTYPE_REFILLING = 11 SITH_COUNTER_PRODUCTTYPE_REFILLING = 11