From 53e5cf782651f3ec04abdfd830e93da8d9cc423d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 27 Feb 2020 15:30:28 +0100 Subject: [PATCH] admin: fix some models not being paginated --- passbook/admin/views/invitations.py | 2 ++ passbook/admin/views/policy.py | 1 + 2 files changed, 3 insertions(+) diff --git a/passbook/admin/views/invitations.py b/passbook/admin/views/invitations.py index 87ad0f3e2..59383d840 100644 --- a/passbook/admin/views/invitations.py +++ b/passbook/admin/views/invitations.py @@ -23,6 +23,8 @@ class InvitationListView(LoginRequiredMixin, PermissionListMixin, ListView): model = Invitation permission_required = "passbook_core.view_invitation" template_name = "administration/invitation/list.html" + paginate_by = 10 + ordering = "-expires" class InvitationCreateView( diff --git a/passbook/admin/views/policy.py b/passbook/admin/views/policy.py index 6282447cb..588f3a5cf 100644 --- a/passbook/admin/views/policy.py +++ b/passbook/admin/views/policy.py @@ -24,6 +24,7 @@ class PolicyListView(LoginRequiredMixin, PermissionListMixin, ListView): model = Policy permission_required = "passbook_core.view_policy" + paginate_by = 10 ordering = "order" template_name = "administration/policy/list.html"