aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/routers.md
diff options
context:
space:
mode:
authorTom Christie2014-08-29 10:03:07 +0100
committerTom Christie2014-08-29 10:03:07 +0100
commit8f4ae06b3b3b9572d72529ffad1842f63ca67d91 (patch)
tree2fc2c0ce267ae04e69213a810286c8b47b02826f /docs/api-guide/routers.md
parentbb1604674f05c0fa5c62e7bb3e7b9d12fd9bf648 (diff)
parent8b2052172cf7138203e683731c30bd279c6e722a (diff)
downloaddjango-rest-framework-8f4ae06b3b3b9572d72529ffad1842f63ca67d91.tar.bz2
Merge pull request #1784 from tomchristie/remove-model-attribute
Deprecate `.model` attribute on views
Diffstat (limited to 'docs/api-guide/routers.md')
-rw-r--r--docs/api-guide/routers.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md
index 2d760ca4..61a476b8 100644
--- a/docs/api-guide/routers.md
+++ b/docs/api-guide/routers.md
@@ -41,9 +41,9 @@ The example above would generate the following URL patterns:
**Note**: The `base_name` argument is used to specify the initial part of the view name pattern. In the example above, that's the `user` or `account` part.
-Typically you won't *need* to specify the `base-name` argument, but if you have a viewset where you've defined a custom `get_queryset` method, then the viewset may not have any `.model` or `.queryset` attribute set. If you try to register that viewset you'll see an error like this:
+Typically you won't *need* to specify the `base-name` argument, but if you have a viewset where you've defined a custom `get_queryset` method, then the viewset may not have a `.queryset` attribute set. If you try to register that viewset you'll see an error like this:
- 'base_name' argument not specified, and could not automatically determine the name from the viewset, as it does not have a '.model' or '.queryset' attribute.
+ 'base_name' argument not specified, and could not automatically determine the name from the viewset, as it does not have a '.queryset' attribute.
This means you'll need to explicitly set the `base_name` argument when registering the viewset, as it could not be automatically determined from the model name.