aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/relations.md
diff options
context:
space:
mode:
authorRyan Kaskel2013-05-18 13:11:40 +0100
committerRyan Kaskel2013-05-18 13:11:40 +0100
commit770ed3de2ef8339ec0b74f7eb522283718e01a3b (patch)
tree563b57c1af80d04ac7564c2e040781ce57bff4f7 /docs/api-guide/relations.md
parent34776da9249a5d73f822b3562bc56a5674b10ac7 (diff)
downloaddjango-rest-framework-770ed3de2ef8339ec0b74f7eb522283718e01a3b.tar.bz2
ToMany fields default to read-only if targeting ManyToManyField.
Diffstat (limited to 'docs/api-guide/relations.md')
-rw-r--r--docs/api-guide/relations.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md
index 155c89de..99fe1083 100644
--- a/docs/api-guide/relations.md
+++ b/docs/api-guide/relations.md
@@ -381,6 +381,15 @@ Note that reverse generic keys, expressed using the `GenericRelation` field, can
For more information see [the Django documentation on generic relations][generic-relations].
+## ManyToManyFields with a Through Model
+
+By default, relational fields that target a ``ManyToManyField`` with a
+``through`` model specified are set to read-only.
+
+If you exlicitly specify a relational field pointing to a
+``ManyToManyField`` with a through model, be sure to set ``read_only``
+to ``True``.
+
## Advanced Hyperlinked fields
If you have very specific requirements for the style of your hyperlinked relationships you can override `HyperlinkedRelatedField`.