* Revert "Revert "Alert list view & caching rework (#216)"" This reverts commit 730dccc3 * Revert "fix AlertGroupClassicMarkdownRenderer" This reverts commit 82e53d8e0c513feb8aaef332fc1d3800e90538fc. * optimize alert group list view * optimize alert group list view
20 lines
459 B
Python
20 lines
459 B
Python
from rest_framework.pagination import CursorPagination, PageNumberPagination
|
|
|
|
|
|
class HundredPageSizePaginator(PageNumberPagination):
|
|
page_size = 100
|
|
|
|
|
|
class FiftyPageSizePaginator(PageNumberPagination):
|
|
page_size = 50
|
|
|
|
|
|
class TwentyFivePageSizePaginator(PageNumberPagination):
|
|
page_size = 25
|
|
|
|
|
|
class TwentyFiveCursorPaginator(CursorPagination):
|
|
page_size = 25
|
|
max_page_size = 100
|
|
page_size_query_param = "perpage"
|
|
ordering = "-pk"
|