Вывод назначенных готов
This commit is contained in:
1 parent
1f7bddff4f
commit
c99172bbdc
10 files changed
+91
-8
No files matched your search
+13
-2
@@ -1,4 +1,4 @@
|
||||
|
||||
from django.views.decorators.http import require_GET
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from .models import *
|
||||
@@ -15,4 +15,15 @@ class GetAllTests(APIView):
|
||||
paginator = AllTestsPagination()
|
||||
paginated_queryset = paginator.paginate_queryset(queryset,request)
|
||||
serializer = TestSerializer(paginated_queryset, many=True)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
|
||||
|
||||
|
||||
class GetAppointmentsUsers(APIView):
|
||||
def get(self, request):
|
||||
id_user = request.GET.get('id')
|
||||
queryset = SavedResultTest.objects.filter(link_on_user=id_user)
|
||||
paginator = AppointmentUserPagination()
|
||||
paginated_queryset = paginator.paginate_queryset(queryset, request)
|
||||
serializer = SavedResultTestSerializer(paginated_queryset, many=True)
|
||||
return paginator.get_paginated_response(serializer.data)
|
||||
Reference in new issue
Block a user