aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTymur Maryokhin2015-01-29 17:28:18 +0100
committerTymur Maryokhin2015-01-29 17:28:18 +0100
commite720927b78a31999f03bfa248329d623ce2c045c (patch)
treecbc175154ae21c78ed20d9bdc436707564ee9e5d /docs
parentba7dca893cd55a1d5ee928c4b10878c92c44c4f5 (diff)
downloaddjango-rest-framework-e720927b78a31999f03bfa248329d623ce2c045c.tar.bz2
Removed deprecated '.model' docs
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/api-guide/generic-views.md8
-rw-r--r--docs/api-guide/routers.md2
-rw-r--r--docs/topics/3.0-announcement.md2
3 files changed, 4 insertions, 8 deletions
diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md
index 6374e305..61c8e8d8 100755
--- a/docs/api-guide/generic-views.md
+++ b/docs/api-guide/generic-views.md
@@ -93,17 +93,13 @@ The following attributes are used to control pagination when used with list view
* `filter_backends` - A list of filter backend classes that should be used for filtering the queryset. Defaults to the same value as the `DEFAULT_FILTER_BACKENDS` setting.
-**Deprecated attributes**:
-
-* `model` - This shortcut may be used instead of setting either (or both) of the `queryset`/`serializer_class` attributes. The explicit style is preferred over the `.model` shortcut, and usage of this attribute is now deprecated.
-
### Methods
**Base methods**:
#### `get_queryset(self)`
-Returns the queryset that should be used for list views, and that should be used as the base for lookups in detail views. Defaults to returning the queryset specified by the `queryset` attribute, or the default queryset for the model if the `model` shortcut is being used.
+Returns the queryset that should be used for list views, and that should be used as the base for lookups in detail views. Defaults to returning the queryset specified by the `queryset` attribute.
This method should always be used rather than accessing `self.queryset` directly, as `self.queryset` gets evaluated only once, and those results are cached for all subsequent requests.
@@ -153,7 +149,7 @@ For example:
#### `get_serializer_class(self)`
-Returns the class that should be used for the serializer. Defaults to returning the `serializer_class` attribute, or dynamically generating a serializer class if the `model` shortcut is being used.
+Returns the class that should be used for the serializer. Defaults to returning the `serializer_class` attribute.
May be overridden to provide dynamic behavior, such as using different serializers for read and write operations, or providing different serializers to different types of users.
diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md
index a9f911a9..592f7d66 100644
--- a/docs/api-guide/routers.md
+++ b/docs/api-guide/routers.md
@@ -28,7 +28,7 @@ There are two mandatory arguments to the `register()` method:
Optionally, you may also specify an additional argument:
-* `base_name` - The base to use for the URL names that are created. If unset the basename will be automatically generated based on the `model` or `queryset` attribute on the viewset, if it has one. Note that if the viewset does not include a `model` or `queryset` attribute then you must set `base_name` when registering the viewset.
+* `base_name` - The base to use for the URL names that are created. If unset the basename will be automatically generated based on the `queryset` attribute of the viewset, if it has one. Note that if the viewset does not include a `queryset` attribute then you must set `base_name` when registering the viewset.
The example above would generate the following URL patterns:
diff --git a/docs/topics/3.0-announcement.md b/docs/topics/3.0-announcement.md
index 5dbc5600..24e69c2d 100644
--- a/docs/topics/3.0-announcement.md
+++ b/docs/topics/3.0-announcement.md
@@ -665,7 +665,7 @@ This code *would be valid* in `2.4.3`:
class Meta:
model = Account
-However this code *would not be valid* in `2.4.3`:
+However this code *would not be valid* in `3.0`:
# Missing `queryset`
class AccountSerializer(serializers.Serializer):