Increase page sizes

This commit is contained in:
Jake Howard 2023-10-06 21:23:32 +01:00
parent 6b117956c0
commit 158ba9cbfc
Signed by: jake
GPG Key ID: 57AFB45680EDD477
4 changed files with 6 additions and 6 deletions

View File

@ -2,5 +2,5 @@ from rest_framework.pagination import PageNumberPagination
class CustomPageNumberPagination(PageNumberPagination):
page_size = 10
max_page_size = 30
page_size = 15
max_page_size = 40

View File

@ -216,7 +216,7 @@ class ContentPage(BaseContentPage):
class BaseListingPage(RoutablePageMixin, BaseContentPage):
PAGE_SIZE = 20
PAGE_SIZE = 30
subtitle = None
content_panels = [

View File

@ -19,7 +19,7 @@ class SearchPage(RoutablePageMixin, BaseContentPage):
max_count = 1
subpage_types: list = []
parent_page_types = ["home.HomePage"]
PAGE_SIZE = 10
PAGE_SIZE = 12
# Exclude singleton pages from search results
EXCLUDED_PAGE_TYPES = {page for page in get_page_models() if page.max_count == 1}

View File

@ -89,9 +89,9 @@ class SearchPageResultsTestCase(TestCase):
)
def test_too_high_page(self) -> None:
with self.assertNumQueries(47):
with self.assertNumQueries(49):
response = self.client.get(
self.url, {"q": "post", "page": 3}, HTTP_HX_REQUEST="true"
self.url, {"q": "post", "page": 30}, HTTP_HX_REQUEST="true"
)
self.assertEqual(response.status_code, 404)