Skip to content
New issue

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

Adjust the examples to have actual side-effects #245

Closed
wants to merge 1 commit into from
Closed

Adjust the examples to have actual side-effects #245

wants to merge 1 commit into from

Conversation

jensenbox
Copy link

Most of the examples did not any effect on the request when they should have been rate limited. This was initially deceptive as it was not clear that nothing would happen.
These changes show the ways in which you can have a rate limit actually happen.

I would propose that the default behavior would have the block option set to True but I would not do that without a larger version number change.

Most of the examples did not any effect on the request when they should have been rate limited. This was initially deceptive as it was not clear that nothing would happen.
These changes show the ways in which you can have a rate limit actually happen.

I would propose that the default behavior would have the `block` option set to True but I would not do that without a larger version number change.
Copy link
Owner

@jsocol jsocol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this, @jensenbox! I think this will make the default behavior much more obvious—though I agree that whatever the reasons were at the time, that default is counterintuitive and should change in a major version bump.

@jsocol
Copy link
Owner

jsocol commented Aug 29, 2021

Actually, #229 has been open without objection for a while, maybe it's time to just make that change, a long with publishing a v4 that actually uses the django_ratelimit package name.

@J4bbi
Copy link

J4bbi commented Sep 6, 2022

I am a new django-ratelimit user, thanks for a great package.

I think it is both counter-intuitive and not clear at all from the documentation that the default behaviour when the rate is exceeded is for nothing to happen.

I would support making this more explicitly visible in document and examples.

@jsocol
Copy link
Owner

jsocol commented Apr 16, 2023

Appreciate the push here, as of #269 / 4.0, this is the default. This PR definitely helped make the call to change it!

@jsocol jsocol closed this Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants