aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/throttling.md
diff options
context:
space:
mode:
authorTom Christie2014-11-25 15:52:36 +0000
committerTom Christie2014-11-25 15:52:36 +0000
commitd7f8047addaea10b0f629e064a3826e7531d8040 (patch)
tree9bd27d74390b313bd1b84a9853531e5814ea24e5 /docs/api-guide/throttling.md
parent64d8e3dcb6846610e1908e067962b0c8457a86f8 (diff)
parent66fc51de5c4622073e7e6cfd12cc7c4a1a8ba60c (diff)
downloaddjango-rest-framework-d7f8047addaea10b0f629e064a3826e7531d8040.tar.bz2
Merge branch 'mkdocs' of git://github.com/d0ugal/django-rest-framework into d0ugal-mkdocs
Diffstat (limited to 'docs/api-guide/throttling.md')
-rw-r--r--docs/api-guide/throttling.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md
index 147c16ff..3f668867 100644
--- a/docs/api-guide/throttling.md
+++ b/docs/api-guide/throttling.md
@@ -1,4 +1,4 @@
-<a class="github" href="throttling.py"></a>
+source: throttling.py
# Throttling
@@ -83,7 +83,7 @@ The throttle classes provided by REST framework use Django's cache backend. You
If you need to use a cache other than `'default'`, you can do so by creating a custom throttle class and setting the `cache` attribute. For example:
class CustomAnonRateThrottle(AnonRateThrottle):
- cache = get_cache('alternate')
+ cache = get_cache('alternate')
You'll need to remember to also set your custom throttle class in the `'DEFAULT_THROTTLE_CLASSES'` settings key, or using the `throttle_classes` view attribute.
@@ -147,15 +147,15 @@ For example, given the following views...
class ContactListView(APIView):
throttle_scope = 'contacts'
...
-
+
class ContactDetailView(ApiView):
throttle_scope = 'contacts'
...
- class UploadView(APIView):
+ class UploadView(APIView):
throttle_scope = 'uploads'
...
-
+
...and the following settings.
REST_FRAMEWORK = {