mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
[documentation] Throttling random request code example fix (#4451)
This commit is contained in:
parent
b683cd7afc
commit
80bd3b9722
|
@ -188,7 +188,7 @@ The following is an example of a rate throttle, that will randomly throttle 1 in
|
|||
|
||||
class RandomRateThrottle(throttling.BaseThrottle):
|
||||
def allow_request(self, request, view):
|
||||
return random.randint(1, 10) == 1
|
||||
return random.randint(1, 10) != 1
|
||||
|
||||
[cite]: https://dev.twitter.com/docs/error-codes-responses
|
||||
[permissions]: permissions.md
|
||||
|
|
Loading…
Reference in New Issue
Block a user