mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-01 22:14:06 +03:00
Tweak copy
This commit is contained in:
parent
6c109ac60f
commit
d8b5d6603e
|
@ -122,7 +122,7 @@ User requests to either `ContactListView` or `ContactDetailView` would be restri
|
||||||
|
|
||||||
## Custom throttles
|
## Custom throttles
|
||||||
|
|
||||||
To implement a custom throttle, override `BaseThrottle` and implement `.allow_request(request)`. The method should return `True` if the request should be allowed, and `False` otherwise.
|
To create a custom throttle, override `BaseThrottle` and implement `.allow_request(request)`. The method should return `True` if the request should be allowed, and `False` otherwise.
|
||||||
|
|
||||||
Optionally you may also override the `.wait()` method. If implemented, `.wait()` should return a recomended number of seconds to wait before attempting the next request, or `None`. The `.wait()` method will only be called if `.check_throttle()` has previously returned `False`.
|
Optionally you may also override the `.wait()` method. If implemented, `.wait()` should return a recomended number of seconds to wait before attempting the next request, or `None`. The `.wait()` method will only be called if `.check_throttle()` has previously returned `False`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user