diff --git a/django_feedback_govuk/settings.py b/django_feedback_govuk/settings.py index 6c31fcf..04c408a 100644 --- a/django_feedback_govuk/settings.py +++ b/django_feedback_govuk/settings.py @@ -15,6 +15,7 @@ "FIELD_COMMENT_LEGEND": "How could we improve this service?", "FIELD_COMMENT_HINT": "Do not include any personal or financial information, for example your National Insurance or credit card numbers.", }, + "SUBMISSION_PAGINATION": 50, "FEEDBACK_FORMS": { DEFAULT_FEEDBACK_ID: { "model": "django_feedback_govuk.models.Feedback", @@ -35,6 +36,7 @@ class DjangoFeedbackGovUKSettings: COPY_FIELD_SATISFACTION_LEGEND: str COPY_FIELD_COMMENT_LEGEND: str COPY_FIELD_COMMENT_HINT: str + SUBMISSION_PAGINATION: int FEEDBACK_FORMS: Dict[str, Dict[str, str]] def __getattr__(self, attr): diff --git a/django_feedback_govuk/views.py b/django_feedback_govuk/views.py index 671bdfa..851244b 100644 --- a/django_feedback_govuk/views.py +++ b/django_feedback_govuk/views.py @@ -106,7 +106,7 @@ def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: class FeedbackListingView(UserCanViewFeedback, ListView): template_name = "django_feedback_govuk/templates/listing.html" model = BaseFeedback - paginate_by = 5 + paginate_by = dfg_settings.SUBMISSION_PAGINATION def dispatch( self, request: http.HttpRequest, *args: Any, **kwargs: Any diff --git a/example_project/example/urls.py b/example_project/example/urls.py index 9da416e..8667ed1 100644 --- a/example_project/example/urls.py +++ b/example_project/example/urls.py @@ -13,6 +13,7 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + from django.contrib import admin from django.urls import include, path