diff options
Diffstat (limited to 'api-guide/views.html')
| -rw-r--r-- | api-guide/views.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api-guide/views.html b/api-guide/views.html index c8338560..8dd319fd 100644 --- a/api-guide/views.html +++ b/api-guide/views.html @@ -298,9 +298,9 @@ This method is used to enforce permissions and throttling, and perform content n def hello_world(request): return Response({"message": "Hello, world!"}) </code></pre> -<p>This view will use the default renderers, parsers, authentication classes etc specified in the <a href="api-guide/settings">settings</a>.</p> +<p>This view will use the default renderers, parsers, authentication classes etc specified in the <a href="settings">settings</a>.</p> <h2 id="api-policy-decorators">API policy decorators</h2> -<p>To override the default settings, REST framework provides a set of additional decorators which can be added to your views. These must come <em>after</em> (below) the <code>@api_view</code> decorator. For example, to create a view that uses a <a href="api-guide/throttling">throttle</a> to ensure it can only be called once per day by a particular user, use the <code>@throttle_classes</code> decorator, passing a list of throttle classes:</p> +<p>To override the default settings, REST framework provides a set of additional decorators which can be added to your views. These must come <em>after</em> (below) the <code>@api_view</code> decorator. For example, to create a view that uses a <a href="throttling">throttle</a> to ensure it can only be called once per day by a particular user, use the <code>@throttle_classes</code> decorator, passing a list of throttle classes:</p> <pre class="prettyprint lang-py"><code>from rest_framework.decorators import api_view, throttle_classes from rest_framework.throttling import UserRateThrottle |
