diff --git a/.env.sample b/.env.sample index a1ea504fc..f572aa09e 100644 --- a/.env.sample +++ b/.env.sample @@ -22,6 +22,7 @@ EMAIL_HOST_PASSWORD= BUGZILLA_HOST= BUGZILLA_API_KEY= BUGZILLA_CC_LIST= +EXPERIMENTS_PAGINATE_BY=50 # Enables the mozlog JSON format for console logging. LOGGING_USE_JSON=True diff --git a/app/experimenter/experiments/views.py b/app/experimenter/experiments/views.py index 3640bc5e0..99d7b7b84 100644 --- a/app/experimenter/experiments/views.py +++ b/app/experimenter/experiments/views.py @@ -1,5 +1,6 @@ import django_filters as filters from django import forms +from django.conf import settings from django.contrib.auth import get_user_model from django.urls import reverse from django.shortcuts import redirect @@ -125,7 +126,7 @@ class ExperimentListView(FilterView): filterset_class = ExperimentFilterset model = Experiment template_name = "experiments/list.html" - paginate_by = 10 + paginate_by = settings.EXPERIMENTS_PAGINATE_BY def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/app/experimenter/settings.py b/app/experimenter/settings.py index 0c20bbd11..9128d1438 100644 --- a/app/experimenter/settings.py +++ b/app/experimenter/settings.py @@ -217,6 +217,9 @@ CORS_ORIGIN_ALLOW_ALL = True # Number of dashboards to deploy per hour DASHBOARD_RATE_LIMIT = 2 +# Experiments list pagination +EXPERIMENTS_PAGINATE_BY = config("EXPERIMENTS_PAGINATE_BY", default=10, cast=int) + # Automated email destinations # SMTP configuration