the middleware documentation needs to clarfiy how to create a middleware to apply a rate limit to all of the views in a project
@method_decorator(ratelimit(key='ip' , rate='3/s' , block=True))
@method_decorator(ratelimit(key='ip' , rate='30/m' , block=True))
def dispatch(self, request, *args, **kwargs):
return super().dispatch(request,*args , **kwargs)
i want all of my views to have these rate limits applied on them . without hard codding and repeating it on everyone of my views
thx.