diff options
| author | Tom Christie | 2013-05-16 10:56:12 -0700 |
|---|---|---|
| committer | Tom Christie | 2013-05-16 10:56:12 -0700 |
| commit | 4ade7fb82c5137b1559a0ef0c1f3a7c4bfe9c553 (patch) | |
| tree | 94e423eb6b52a177ae26bc72bb16cb71bae80275 /docs/api-guide | |
| parent | 0e81ffced2a713d07483f9d18b3fc9d4c011a065 (diff) | |
| parent | abe207b869c771187523efd3d189ffc0beba51c3 (diff) | |
| download | django-rest-framework-4ade7fb82c5137b1559a0ef0c1f3a7c4bfe9c553.tar.bz2 | |
Merge pull request #844 from rouge8/hyperlinkedidentityfield-lookup_field
HyperlinkedIdentityField uses `lookup_field` kwarg.
Diffstat (limited to 'docs/api-guide')
| -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. --- |
