Increase page sizes
This commit is contained in:
parent
6b117956c0
commit
158ba9cbfc
4 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -216,7 +216,7 @@ class ContentPage(BaseContentPage):
|
|||
|
||||
|
||||
class BaseListingPage(RoutablePageMixin, BaseContentPage):
|
||||
PAGE_SIZE = 20
|
||||
PAGE_SIZE = 30
|
||||
subtitle = None
|
||||
|
||||
content_panels = [
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue