We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently:
@ratelimit(increment=lambda req, resp: resp.count) def login(request): resp = HttpResponseRedirect() if login_is_correct: # Do not count correct logins against the limit. resp.count = False else: resp.count = True return resp
Fails if the ratelimit kicks in:
AttributeError: 'HttpResponseTooManyRequests' object has no attribute 'count'
Ratelimit decorator should not increment, or should not call increment function if the response is a HttpResponseTooManyRequests object
HttpResponseTooManyRequests
The text was updated successfully, but these errors were encountered:
Nice catch. Thanks for the PR, too!
Sorry, something went wrong.
Merge pull request #11 from jvc26/#10
ed752d5
Fix for #10
Should this be closed?
No branches or pull requests
Currently:
Fails if the ratelimit kicks in:
Ratelimit decorator should not increment, or should not call increment function if the response is a
HttpResponseTooManyRequests
objectThe text was updated successfully, but these errors were encountered: