0

I have the following ViewSet in Django Rest Framework:

class FilterProductsViewSet(viewsets.ViewSet):
    permission_classes = (permissions.IsAuthenticated,)

    @transaction.atomic
    def post(self, request):
        from inventory.models import Product, Stock

        size = len(request.data)
        response = get_filter(request.data, size)
        return Response(response)

I want the response to be paginated, but I haven't found documentation on how to do it with a ViewSet instance.

I'll appreciate your help.

HuLu ViCa
  • 5,077
  • 10
  • 43
  • 93
  • Does this answer your question? [Django Rest Framework - APIView Pagination](https://stackoverflow.com/questions/35830779/django-rest-framework-apiview-pagination) – JPG Oct 09 '20 at 15:38
  • FYI: `ViewSet` is a subclass of `APIView` and doesn't come with a *pagination support*. So, the dup is applicable for the OP – JPG Oct 09 '20 at 15:39

0 Answers0