Configuration pagination size ref #821

This commit is contained in:
Mathieu Leplatre 2019-02-14 12:41:30 +01:00 коммит произвёл Jared Kerim
Родитель 77b0d392e6
Коммит f7c67484ed
3 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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)

Просмотреть файл

@ -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