diff options
| author | Tom Christie | 2012-10-15 13:27:50 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-10-15 13:27:50 +0100 |
| commit | 9c1fba3483b7e81da0744464dcf23a5f12711de2 (patch) | |
| tree | d9370dc9fb9d2fea65192bf5ce4d7fb594d3ad0c /docs/api-guide/throttling.md | |
| parent | e88ca9637bd4f49659dd80ca7afd0f38adf07746 (diff) | |
| download | django-rest-framework-9c1fba3483b7e81da0744464dcf23a5f12711de2.tar.bz2 | |
Tweak parsers to take parser_context
Diffstat (limited to 'docs/api-guide/throttling.md')
| -rw-r--r-- | docs/api-guide/throttling.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md index 0e228905..3fb95ae3 100644 --- a/docs/api-guide/throttling.md +++ b/docs/api-guide/throttling.md @@ -63,6 +63,8 @@ Or, if you're using the `@api_view` decorator with function based views. } return Response(content) +# API Reference + ## AnonRateThrottle The `AnonThrottle` will only ever throttle unauthenticated users. The IP address of the incoming request is used to generate a unique key to throttle against. @@ -142,7 +144,7 @@ For example, given the following views... User requests to either `ContactListView` or `ContactDetailView` would be restricted to a total of 1000 requests per-day. User requests to `UploadView` would be restricted to 20 requests per day. -## Custom throttles +# Custom throttles To create a custom throttle, override `BaseThrottle` and implement `.allow_request(request, view)`. The method should return `True` if the request should be allowed, and `False` otherwise. |
