Having trouble making a custom django view decorator (with args)
问题 So I've read all the similar questions and copied what they wrote but I still keep having issues. So I want something like this # Yes, I know django has one but I want to make my own @rate_limit(seconds=10) myview(request, somearg, *args, **kwargs): # Return a response ... def rate_limit(seconds=10): def decorator(view): def wrapper(request, *args, **kwargs): # Do some stuff return view(request, *args, **kwargs) return wrapper return decorator When I run it I get the error decorator() got an