class ExampleView(APIView):
throttle_classes = [UserRateThrottle]
def get(self, request, format=None):
content = {
'status': 'request was permitted'
}
return Response(content)
def post(self, request, format=None):
content = {
'status': 'request was permitted'
}
return Response(content)
I want to throttle only the post method view not the get. I have declared two views POST and GET and I want only to implement throttling for my POST view
You can try this, this overrides the get_throttles method and does not include throttles for POST method.