aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/throttling.py
diff options
context:
space:
mode:
authorCraig de Stigter2013-05-18 10:23:26 +0200
committerCraig de Stigter2013-05-18 10:23:26 +0200
commitc56d5f8f63673e2d0235015e67d78f8e0e1d7550 (patch)
treebf96abef843accae2439413de45095de2995f473 /rest_framework/throttling.py
parent84be169353f0dd2ceb06fe459b72aa2452fcbeb5 (diff)
parent34776da9249a5d73f822b3562bc56a5674b10ac7 (diff)
downloaddjango-rest-framework-c56d5f8f63673e2d0235015e67d78f8e0e1d7550.tar.bz2
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'rest_framework/throttling.py')
-rw-r--r--rest_framework/throttling.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rest_framework/throttling.py b/rest_framework/throttling.py
index 810cad63..93ea9816 100644
--- a/rest_framework/throttling.py
+++ b/rest_framework/throttling.py
@@ -1,3 +1,6 @@
+"""
+Provides various throttling policies.
+"""
from __future__ import unicode_literals
from django.core.cache import cache
from rest_framework import exceptions
@@ -28,9 +31,8 @@ class SimpleRateThrottle(BaseThrottle):
A simple cache implementation, that only requires `.get_cache_key()`
to be overridden.
- The rate (requests / seconds) is set by a :attr:`throttle` attribute
- on the :class:`.View` class. The attribute is a string of the form 'number of
- requests/period'.
+ The rate (requests / seconds) is set by a `throttle` attribute on the View
+ class. The attribute is a string of the form 'number_of_requests/period'.
Period should be one of: ('s', 'sec', 'm', 'min', 'h', 'hour', 'd', 'day')