Add DASHBOARD_PAGE_SIZE to settings

This commit is contained in:
Paweł Jastrzębski 2021-04-30 08:36:50 +02:00
parent 351efff147
commit 9fb875f749
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ from .mixins import DateRangeMixin
class DashboardView(LoginRequiredMixin, DateRangeMixin, ListView):
model = Service
template_name = "dashboard/pages/dashboard.html"
paginate_by = 5
paginate_by = settings.DASHBOARD_PAGE_SIZE
def get_queryset(self):
return Service.objects.filter(

View File

@ -339,3 +339,5 @@ BLOCK_ALL_IPS = os.getenv("BLOCK_ALL_IPS", "False") == "True"
# Include date and service ID in salt?
AGGRESSIVE_HASH_SALTING = os.getenv("AGGRESSIVE_HASH_SALTING", "False") == "True"
DASHBOARD_PAGE_SIZE = os.getenv("DASHBOARD_PAGE_SIZE", 5)