mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Docs updated
This commit is contained in:
parent
e1157525f9
commit
6bcac18e7e
|
@ -245,7 +245,7 @@ All the relational fields may be used for any relationship or reverse relationsh
|
||||||
|
|
||||||
## Reverse relational fields
|
## Reverse relational fields
|
||||||
|
|
||||||
By default reverse relational fields are not displayed when ModelSerializer is used. You can control this behavior by using `INCLUDE_REVERSE_RELATIONS` setting.
|
By default reverse relational fields are not displayed when ModelSerializer is used. You can control this behavior by using `DEFAULT_INCLUDE_REVERSE_RELATIONS` setting.
|
||||||
|
|
||||||
Besides global setting you can also use model specific setting:
|
Besides global setting you can also use model specific setting:
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,12 @@ Default: `rest_framework.serializers.ModelSerializer`
|
||||||
|
|
||||||
Default: `rest_framework.pagination.PaginationSerializer`
|
Default: `rest_framework.pagination.PaginationSerializer`
|
||||||
|
|
||||||
|
## DEFAULT_INCLUDE_REVERSE_RELATIONS
|
||||||
|
|
||||||
|
If set to `True`, ModelSerializer will display reverse relational fields from other models.
|
||||||
|
|
||||||
|
Default: `False`
|
||||||
|
|
||||||
## FILTER_BACKEND
|
## FILTER_BACKEND
|
||||||
|
|
||||||
The filter backend class that should be used for generic filtering. If set to `None` then generic filtering is disabled.
|
The filter backend class that should be used for generic filtering. If set to `None` then generic filtering is disabled.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user