Django_rest_framework uses post method to realize pagination

I saw a paging method on the Internet:

    def get(self, request, format=None):
        -sharp 
        roles = Product.objects.all()
        -sharp 
        pg = PageNumberPagination()
        -sharp 
        page_roles = pg.paginate_queryset(queryset=roles, request=request, view=self)
        -sharp 
        ser = ProductSerializer(instance=page_roles, many=True)
        return Response(ser.data, status=HTTP_200_OK)

but this method only accepts one numeric parameter, and I want to bring user data for permission authentication. Is there any other paging method that can carry both paging information and user information


when request comes, there is user information in request.user

Menu