aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/generic-views.md
diff options
context:
space:
mode:
authorTom Christie2013-05-02 12:08:05 +0100
committerTom Christie2013-05-02 12:08:05 +0100
commit74beaefd1205503c06fdff8bb2621ba4c8c5baaa (patch)
treee8055a54dcf97b69b48e0f4c13ed15eeca34701b /docs/api-guide/generic-views.md
parent387250bee438a3826191b2d0d196d0c11373f7f3 (diff)
downloaddjango-rest-framework-74beaefd1205503c06fdff8bb2621ba4c8c5baaa.tar.bz2
Simplifying bits of docs
Diffstat (limited to 'docs/api-guide/generic-views.md')
-rwxr-xr-xdocs/api-guide/generic-views.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md
index 4a24b7c7..5de12bdb 100755
--- a/docs/api-guide/generic-views.md
+++ b/docs/api-guide/generic-views.md
@@ -62,6 +62,10 @@ The following attributes control the basic view behavior.
* `serializer_class` - The serializer class that should be used for validating and deserializing input, and for serializing output. Typically, you must either set this attribute, or override the `get_serializer_class()` method.
* `lookup_field` - The field that should be used to lookup individual model instances. Defaults to `'pk'`. The URL conf should include a keyword argument corresponding to this value. More complex lookup styles can be supported by overriding the `get_object()` method.
+**Shortcuts**:
+
+* `model` - This shortcut may be used instead of setting either (or both) of the `queryset`/`serializer_class` attributes, although using the explicit style is generally preferred. If used instead of `serializer_class`, then then `DEFAULT_MODEL_SERIALIZER_CLASS` setting will determine the base serializer class.
+
**Pagination**:
The following attibutes are used to control pagination when used with list views.
@@ -75,7 +79,6 @@ The following attibutes are used to control pagination when used with list views
* `filter_backend` - The filter backend class that should be used for filtering the queryset. Defaults to the same value as the `FILTER_BACKEND` setting.
* `allow_empty` - Determines if an empty list should successfully display zero results, or return a 404 response. Defaults to `True`, meaning empty lists will return sucessful `200 OK` responses, with zero results.
-* `model` - This shortcut may be used instead of setting either (or both) of the `queryset`/`serializer_class` attributes, although using the explicit style is generally preferred. If used instead of `serializer_class`, then then `DEFAULT_MODEL_SERIALIZER_CLASS` setting will determine the base serializer class.
### Methods
@@ -160,7 +163,7 @@ The following classes are the concrete generic views. If you're using generic v
Used for **create-only** endpoints.
-Provides `post` method handlers.
+Provides a `post` method handler.
Extends: [GenericAPIView], [CreateModelMixin]