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.