mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-25 23:50:01 +03:00
added remaining docs
This commit is contained in:
parent
5743e50690
commit
ec29d44df3
|
@ -322,6 +322,7 @@ By default, `HyperlinkedRelatedField` is read-write, although you can change thi
|
||||||
* `pk_url_kwarg` - The named url parameter for the pk field lookup. Default is `pk`.
|
* `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`.
|
* `slug_url_kwarg` - The named url parameter for the slug field lookup. Default is to use the same value as given for `slug_field`.
|
||||||
* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships.
|
* `null` - If set to `True`, the field will accept values of `None` or the emptystring for nullable relationships.
|
||||||
|
* `use_absolute_urls` - This option will overwrite the serializer option `use_absolute_urls`.
|
||||||
|
|
||||||
## HyperLinkedIdentityField
|
## HyperLinkedIdentityField
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,14 @@ As an example, let's create a field that can be used represent the class name of
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
## Meta options
|
||||||
|
|
||||||
|
**TODO** add remaining serializer meta options
|
||||||
|
|
||||||
|
### `use_absolute_urls`
|
||||||
|
|
||||||
|
This setting will overwrite the `REST_FRAMEWORK` option `USE_ABSOLUTE_URLS` and can also be overwritten by the field attribute `use_absolute_urls`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# ModelSerializers
|
# ModelSerializers
|
||||||
|
|
|
@ -170,4 +170,6 @@ Default: `'format'`
|
||||||
|
|
||||||
Default: `True`
|
Default: `True`
|
||||||
|
|
||||||
|
This setting can overwritten by the serializer meta option `use_absolute_urls` which also can be overwritten by the field attribute `use_absolute_urls`.
|
||||||
|
|
||||||
[cite]: http://www.python.org/dev/peps/pep-0020/
|
[cite]: http://www.python.org/dev/peps/pep-0020/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user