Вывод назначенных готов

This commit is contained in:
Andrei Filippov committed 2024-09-11 16:31:51 +03:00
1 parent 8e55ec4d3e
commit 195ad0b43d
10 files changed
+91 -8

No files matched your search

+11 -2
View File
@@ -4,10 +4,8 @@ from rest_framework.response import Response
class AllTestsPagination(LimitOffsetPagination):
# Переопределяем лимит по умолчанию
default_limit = 1
# Максимальный лимит на странице
max_limit = 3
def get_paginated_response(self, data):
return Response({
@@ -18,3 +16,14 @@ class AllTestsPagination(LimitOffsetPagination):
})
class AppointmentUserPagination(LimitOffsetPagination):
default_limit = 1
max_limit = 3
def get_paginated_response(self, data):
return Response({
'total_count': self.count,
'limit': self.limit,
'offset': self.offset,
'results': data,
})