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): class CustomPageNumberPagination(PageNumberPagination):
page_size = 10 page_size = 15
max_page_size = 30 max_page_size = 40

View file

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

View file

@ -19,7 +19,7 @@ class SearchPage(RoutablePageMixin, BaseContentPage):
max_count = 1 max_count = 1
subpage_types: list = [] subpage_types: list = []
parent_page_types = ["home.HomePage"] parent_page_types = ["home.HomePage"]
PAGE_SIZE = 10 PAGE_SIZE = 12
# Exclude singleton pages from search results # Exclude singleton pages from search results
EXCLUDED_PAGE_TYPES = {page for page in get_page_models() if page.max_count == 1} 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: def test_too_high_page(self) -> None:
with self.assertNumQueries(47): with self.assertNumQueries(49):
response = self.client.get( 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) self.assertEqual(response.status_code, 404)