0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed #8967: Added documentation for the 'through' option on a many-to-many field in the fields reference documentation.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9083 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2008-09-22 11:07:35 +00:00
parent 5563362c4c
commit 54f962c0bf
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~