paginicie na apiview DRF

class NameOfView(APIView):

    def get(self, request):
        paginator = CustomPagination()
        queryset = Model.objects.all()
        paginate_queryset = paginator.paginate_queryset(queryset, request)
        serialize_pagination = SerializerClass(paginate_queryset, many=True).data
        data = paginator.get_paginated_response(serialize_pagination).data
        return Response(data)
codeAdept