aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/throttling.md
diff options
context:
space:
mode:
authorTom Christie2013-08-21 19:46:09 +0100
committerTom Christie2013-08-21 19:46:09 +0100
commit5e40e50f2b187fe2ff2e8ee63b4e39ece42f1521 (patch)
treefff155cd7be62d61204806ac4bde14eeec8691da /docs/api-guide/throttling.md
parentf84d4951bfcc8887d57ca5fa0321cfdbb18a9b6d (diff)
downloaddjango-rest-framework-5e40e50f2b187fe2ff2e8ee63b4e39ece42f1521.tar.bz2
Include import paths throughout docs.
Closes #1051. Thanks to @pydanny for the report.
Diffstat (limited to 'docs/api-guide/throttling.md')
-rw-r--r--docs/api-guide/throttling.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md
index 56f32f58..42f9c228 100644
--- a/docs/api-guide/throttling.md
+++ b/docs/api-guide/throttling.md
@@ -43,6 +43,10 @@ The rate descriptions used in `DEFAULT_THROTTLE_RATES` may include `second`, `mi
You can also set the throttling policy on a per-view or per-viewset basis,
using the `APIView` class based views.
+ from rest_framework.response import Response
+ from rest_framework.throttling import UserRateThrottle
+ from rest_framework.views import APIView
+
class ExampleView(APIView):
throttle_classes = (UserRateThrottle,)