diff options
| author | Ryan Kaskel | 2013-05-18 14:17:50 +0100 |
|---|---|---|
| committer | Ryan Kaskel | 2013-05-18 14:17:50 +0100 |
| commit | 22874e441dd71101296a656e753bfc17907b5cca (patch) | |
| tree | 6ebf7971e5bf8d40c6d60fa857cbe0c04fc91372 /rest_framework/throttling.py | |
| parent | b5640bb77843c50f42a649982b9b9592113c6f59 (diff) | |
| parent | a0e3c44c99a61a6dc878308bdf0890fbb10c41e4 (diff) | |
| download | django-rest-framework-22874e441dd71101296a656e753bfc17907b5cca.tar.bz2 | |
Merge latest changes from master.
Diffstat (limited to 'rest_framework/throttling.py')
| -rw-r--r-- | rest_framework/throttling.py | 8 |
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') |
