Skip to content

Commit

Permalink
Expand pagination for feedback page (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
alsyx authored Aug 16, 2024
1 parent c2a4caf commit 20281fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions django_feedback_govuk/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion django_feedback_govuk/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions example_project/example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 20281fe

Please sign in to comment.