aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/fields.md
diff options
context:
space:
mode:
authorTom Christie2012-11-06 17:11:52 +0000
committerTom Christie2012-11-06 17:11:52 +0000
commit6d3bb67aa654d5f4c555746655a312000422d474 (patch)
tree2bf4bcdbb8f91bbdc685107e0629a76877cafc4f /docs/api-guide/fields.md
parentcedb3860f4339db63dea61ac5a9b0bc08c673ea8 (diff)
downloaddjango-rest-framework-6d3bb67aa654d5f4c555746655a312000422d474.tar.bz2
Add pk_url_kwarg to hyperlinked fields
Diffstat (limited to 'docs/api-guide/fields.md')
-rw-r--r--docs/api-guide/fields.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/api-guide/fields.md b/docs/api-guide/fields.md
index 2a8949a1..0485b158 100644
--- a/docs/api-guide/fields.md
+++ b/docs/api-guide/fields.md
@@ -268,6 +268,7 @@ By default, `HyperlinkedRelatedField` is read-write, although you can change thi
* `format` - If using format suffixes, hyperlinked fields will use the same format suffix for the target unless overridden by using the `format` argument.
* `queryset` - By default `ModelSerializer` classes will use the default queryset for the relationship. `Serializer` classes must either set a queryset explicitly, or set `read_only=True`.
* `slug_field` - The field on the target that should be used for the lookup. Default is `'slug'`.
+* `pk_url_kwarg` - The named url parameter for the pk field lookup. Default is `pk`.
* `slug_url_kwarg` - The named url parameter for the slug field lookup. Default is to use the same value as given for `slug_field`.
## HyperLinkedIdentityField
@@ -281,6 +282,7 @@ This field is always read-only.
* `view_name` - The view name that should be used as the target of the relationship. **required**.
* `format` - If using format suffixes, hyperlinked fields will use the same format suffix for the target unless overridden by using the `format` argument.
* `slug_field` - The field on the target that should be used for the lookup. Default is `'slug'`.
+* `pk_url_kwarg` - The named url parameter for the pk field lookup. Default is `pk`.
* `slug_url_kwarg` - The named url parameter for the slug field lookup. Default is to use the same value as given for `slug_field`.
[cite]: http://www.python.org/dev/peps/pep-0020/