summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt11
-rw-r--r--docs/topics/db/models.txt2
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 9c5fd23a36..ac1e2ffffb 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -887,6 +887,17 @@ that control how the relationship functions.
add the descriptor for the reverse relationship, allowing
:class:`ManyToManyField` relationships to be non-symmetrical.
+.. attribute:: ManyToManyFields.through
+
+ Django will automatically generate a table to manage many-to-many
+ relationships. However, if you want to manually specify the intermediary
+ table, you can use the :attr:`~ManyToManyField.through` option to specify
+ the Django model that represents the intermediate table that you want to
+ use.
+
+ The most common use for this option is when you want to associate
+ :ref:`extra data with a many-to-many relationship <intermediary-manytomany>`.
+
.. attribute:: ManyToManyField.db_table
The name of the table to create for storing the many-to-many data. If this
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index 7a38baec50..0b82bca9c4 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -357,6 +357,8 @@ arguments which are explained in :ref:`the model field reference
<manytomany-arguments>`. These options help define how the relationship should
work; all are optional.
+.. _intermediary-manytomany:
+
Extra fields on many-to-many relationships
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~