diff options
| author | Andy Freeland | 2013-05-16 11:24:11 -0400 |
|---|---|---|
| committer | Andy Freeland | 2013-05-16 11:48:35 -0400 |
| commit | abe207b869c771187523efd3d189ffc0beba51c3 (patch) | |
| tree | 94e423eb6b52a177ae26bc72bb16cb71bae80275 /docs/api-guide/relations.md | |
| parent | 0e81ffced2a713d07483f9d18b3fc9d4c011a065 (diff) | |
| download | django-rest-framework-abe207b869c771187523efd3d189ffc0beba51c3.tar.bz2 | |
HyperlinkedIdentityField uses `lookup_field` kwarg.
According to the [Serializers API Guide][1], `HyperlinkedIdentityField`
takes `lookup_field` as a kwarg like the other related fields and the
generic views. However, this was not actually implemented.
[1]: http://django-rest-framework.org/api-guide/serializers.html#hyperlinkedmodelserializer
Diffstat (limited to 'docs/api-guide/relations.md')
| -rw-r--r-- | docs/api-guide/relations.md | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md index 756e1562..155c89de 100644 --- a/docs/api-guide/relations.md +++ b/docs/api-guide/relations.md @@ -196,15 +196,13 @@ Would serialize to a representation like this: 'artist': 'Thom Yorke' 'track_listing': 'http://www.example.com/api/track_list/12/', } - + This field is always read-only. **Arguments**: * `view_name` - The view name that should be used as the target of the relationship. **required**. -* `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`. +* `lookup_field` - The field on the target that should be used for the lookup. Should correspond to a URL keyword argument on the referenced view. Default is `'pk'`. * `format` - If using format suffixes, hyperlinked fields will use the same format suffix for the target unless overridden by using the `format` argument. --- |
