diff options
| author | Tom Christie | 2012-09-20 13:06:27 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-20 13:06:27 +0100 | 
| commit | 4b691c402707775c3048a90531024f3bc5be6f91 (patch) | |
| tree | 3adfc54b0d8b70e4ea78edf7091f7827fa68f47b /docs/api-guide/throttling.md | |
| parent | a1bcfbfe926621820832e32b0427601e1140b4f7 (diff) | |
| download | django-rest-framework-4b691c402707775c3048a90531024f3bc5be6f91.tar.bz2 | |
Change package name: djangorestframework -> rest_framework
Diffstat (limited to 'docs/api-guide/throttling.md')
| -rw-r--r-- | docs/api-guide/throttling.md | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md index 10997801..7861e9ba 100644 --- a/docs/api-guide/throttling.md +++ b/docs/api-guide/throttling.md @@ -29,10 +29,10 @@ If any throttle check fails an `exceptions.Throttled` exception will be raised,  The default throttling policy may be set globally, using the `DEFAULT_THROTTLES` and `DEFAULT_THROTTLE_RATES` settings.  For example. -    API_SETTINGS = { +    REST_FRAMEWORK = {          'DEFAULT_THROTTLES': ( -            'djangorestframework.throttles.AnonThrottle', -            'djangorestframework.throttles.UserThrottle', +            'rest_framework.throttles.AnonThrottle', +            'rest_framework.throttles.UserThrottle',          )          'DEFAULT_THROTTLE_RATES': {              'anon': '100/day', @@ -95,7 +95,7 @@ For example, multiple user throttle rates could be implemented by using the foll  ...and the following settings. -    API_SETTINGS = { +    REST_FRAMEWORK = {          'DEFAULT_THROTTLES': (              'example.throttles.BurstRateThrottle',              'example.throttles.SustainedRateThrottle', @@ -130,9 +130,9 @@ For example, given the following views...  ...and the following settings. -    API_SETTINGS = { +    REST_FRAMEWORK = {          'DEFAULT_THROTTLES': ( -            'djangorestframework.throttles.ScopedRateThrottle', +            'rest_framework.throttles.ScopedRateThrottle',          )          'DEFAULT_THROTTLE_RATES': {              'contacts': '1000/day', @@ -148,4 +148,4 @@ To create a custom throttle, override `BaseThrottle` and implement `.allow_reque  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`. -[permissions]: permissions.md
\ No newline at end of file +[permissions]: permissions.md | 
