Adding 'view or viewset' to docs appropriate.

This commit is contained in:
Tom Christie 2013-04-26 14:03:26 +01:00
parent d985aec3c9
commit e301e2d974
6 changed files with 14 additions and 8 deletions

View File

@ -43,7 +43,8 @@ The default authentication schemes may be set globally, using the `DEFAULT_AUTHE
)
}
You can also set the authentication scheme on a per-view basis, using the `APIView` class based views.
You can also set the authentication scheme on a per-view or per-viewset basis,
using the `APIView` class based views.
class ExampleView(APIView):
authentication_classes = (SessionAuthentication, BasicAuthentication)

View File

@ -94,7 +94,8 @@ You must also set the filter backend to `DjangoFilterBackend` in your settings:
## Specifying filter fields
If all you need is simple equality-based filtering, you can set a `filter_fields` attribute on the view, listing the set of fields you wish to filter against.
If all you need is simple equality-based filtering, you can set a `filter_fields` attribute on the view, or viewset,
listing the set of fields you wish to filter against.
class ProductList(generics.ListAPIView):
queryset = Product.objects.all()

View File

@ -34,7 +34,8 @@ The default set of parsers may be set globally, using the `DEFAULT_PARSER_CLASSE
)
}
You can also set the renderers used for an individual view, using the `APIView` class based views.
You can also set the renderers used for an individual view, or viewset,
using the `APIView` class based views.
class ExampleView(APIView):
"""
@ -187,4 +188,4 @@ The following third party packages are also available.
[cite]: https://groups.google.com/d/topic/django-developers/dxI4qVzrBY4/discussion
[messagepack]: https://github.com/juanriaza/django-rest-framework-msgpack
[juanriaza]: https://github.com/juanriaza
[djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack
[djangorestframework-msgpack]: https://github.com/juanriaza/django-rest-framework-msgpack

View File

@ -39,7 +39,8 @@ If not specified, this setting defaults to allowing unrestricted access:
'rest_framework.permissions.AllowAny',
)
You can also set the authentication policy on a per-view basis, using the `APIView` class based views.
You can also set the authentication policy on a per-view, or per-viewset basis,
using the `APIView` class based views.
class ExampleView(APIView):
permission_classes = (IsAuthenticated,)

View File

@ -27,7 +27,8 @@ The default set of renderers may be set globally, using the `DEFAULT_RENDERER_CL
)
}
You can also set the renderers used for an individual view, using the `APIView` class based views.
You can also set the renderers used for an individual view, or viewset,
using the `APIView` class based views.
class UserCountView(APIView):
"""

View File

@ -40,7 +40,8 @@ The default throttling policy may be set globally, using the `DEFAULT_THROTTLE_C
The rate descriptions used in `DEFAULT_THROTTLE_RATES` may include `second`, `minute`, `hour` or `day` as the throttle period.
You can also set the throttling policy on a per-view basis, using the `APIView` class based views.
You can also set the throttling policy on a per-view or per-viewset basis,
using the `APIView` class based views.
class ExampleView(APIView):
throttle_classes = (UserThrottle,)
@ -167,4 +168,4 @@ The following is an example of a rate throttle, that will randomly throttle 1 in
[cite]: https://dev.twitter.com/docs/error-codes-responses
[permissions]: permissions.md
[cache-setting]: https://docs.djangoproject.com/en/dev/ref/settings/#caches
[cache-docs]: https://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache
[cache-docs]: https://docs.djangoproject.com/en/dev/topics/cache/#setting-up-the-cache