aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/serializers.md
diff options
context:
space:
mode:
authorTom Christie2013-04-30 08:24:33 +0100
committerTom Christie2013-04-30 08:24:33 +0100
commit21ae3a66917acf4ea57e8f7940ce1a6823a2ce92 (patch)
treebd4cef8d397b6a51ca2eae044b0f042949c92acc /docs/api-guide/serializers.md
parent81c3b4f250e389c29bdaa7da07c4860e2175136d (diff)
downloaddjango-rest-framework-21ae3a66917acf4ea57e8f7940ce1a6823a2ce92.tar.bz2
Drop out attribute
Diffstat (limited to 'docs/api-guide/serializers.md')
-rwxr-xr-xdocs/api-guide/serializers.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md
index 2797b5f5..c48461d8 100755
--- a/docs/api-guide/serializers.md
+++ b/docs/api-guide/serializers.md
@@ -374,16 +374,20 @@ Returns the field instance that should be used to represent the pk field.
### get_nested_field
-**Signature**: `.get_nested_field(self, model_field)`
+**Signature**: `.get_nested_field(self, model_field, related_model, to_many)`
Returns the field instance that should be used to represent a related field when `depth` is specified as being non-zero.
+Note that the `model_field` argument will be `None` for reverse relationships. The `related_model` argument will be the model class for the target of the field. The `to_many` argument will be a boolean indicating if this is a to-one or to-many relationship.
+
### get_related_field
-**Signature**: `.get_related_field(self, model_field, to_many=False)`
+**Signature**: `.get_related_field(self, model_field, related_model, to_many)`
Returns the field instance that should be used to represent a related field when `depth` is not specified, or when nested representations are being used and the depth reaches zero.
+Note that the `model_field` argument will be `None` for reverse relationships. The `related_model` argument will be the model class for the target of the field. The `to_many` argument will be a boolean indicating if this is a to-one or to-many relationship.
+
### get_field
**Signature**: `.get_field(self, model_field)`