mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
Small doc typo throttles
--> throttling
This commit is contained in:
parent
cadbfbabe2
commit
f60c0e99f6
|
@ -184,7 +184,7 @@ If the `.wait()` method is implemented and the request is throttled, then a `Ret
|
||||||
|
|
||||||
The following is an example of a rate throttle, that will randomly throttle 1 in every 10 requests.
|
The following is an example of a rate throttle, that will randomly throttle 1 in every 10 requests.
|
||||||
|
|
||||||
class RandomRateThrottle(throttles.BaseThrottle):
|
class RandomRateThrottle(throttling.BaseThrottle):
|
||||||
def allow_request(self, request, view):
|
def allow_request(self, request, view):
|
||||||
return random.randint(1, 10) == 1
|
return random.randint(1, 10) == 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user