diff --git a/website/api/pagination.py b/website/api/pagination.py index f023baf..db74939 100644 --- a/website/api/pagination.py +++ b/website/api/pagination.py @@ -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 diff --git a/website/common/models.py b/website/common/models.py index 6088649..b1ffc02 100644 --- a/website/common/models.py +++ b/website/common/models.py @@ -216,7 +216,7 @@ class ContentPage(BaseContentPage): class BaseListingPage(RoutablePageMixin, BaseContentPage): - PAGE_SIZE = 20 + PAGE_SIZE = 30 subtitle = None content_panels = [ diff --git a/website/search/models.py b/website/search/models.py index 6d33851..1dcbe64 100644 --- a/website/search/models.py +++ b/website/search/models.py @@ -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} diff --git a/website/search/tests.py b/website/search/tests.py index 01f51fa..6a85c60 100644 --- a/website/search/tests.py +++ b/website/search/tests.py @@ -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)