aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorJacek Bzdak2013-10-22 13:13:01 +0200
committerJacek Bzdak2013-10-22 13:13:01 +0200
commit8fffc346c1c4fe6e634ce60bd0371217b07ecf5c (patch)
treed9f52a4b886d574039cdcffd72266df49c1b6a8c /docs/api-guide
parent25c9d552c05527f4b8b257d59cd7be39005f3668 (diff)
parentfa87fac61b87858e80788fc233591fa11dbc18e7 (diff)
downloaddjango-rest-framework-8fffc346c1c4fe6e634ce60bd0371217b07ecf5c.tar.bz2
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/exceptions.md2
-rwxr-xr-xdocs/api-guide/generic-views.md3
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/api-guide/exceptions.md b/docs/api-guide/exceptions.md
index 0c48783a..c46d415e 100644
--- a/docs/api-guide/exceptions.md
+++ b/docs/api-guide/exceptions.md
@@ -82,7 +82,7 @@ Note that the exception handler will only be called for responses generated by r
## APIException
-**Signature:** `APIException(detail=None)`
+**Signature:** `APIException()`
The **base class** for all exceptions raised inside REST framework.
diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md
index dc0076df..24fc0bc7 100755
--- a/docs/api-guide/generic-views.md
+++ b/docs/api-guide/generic-views.md
@@ -65,7 +65,8 @@ The following attributes control the basic view behavior.
* `queryset` - The queryset that should be used for returning objects from this view. Typically, you must either set this attribute, or override the `get_queryset()` method.
* `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. Note that when using hyperlinked APIs you'll need to ensure that *both* the API views *and* the serializer classes use lookup fields that correctly correspond with the URL conf.
+* `lookup_field` - The model field that should be used to for performing object lookup of individual model instances. Defaults to `'pk'`. Note that when using hyperlinked APIs you'll need to ensure that *both* the API views *and* the serializer classes set the lookup fields if you need to use a custom value.
+* `lookup_url_kwarg` - The URL keyword argument that should be used for object lookup. The URL conf should include a keyword argument corresponding to this value. If unset this defaults to using the same value as `lookup_field`.
**Shortcuts**: