summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-09-01 13:46:51 -0400
committerTim Graham <timograham@gmail.com>2017-09-01 20:03:32 -0400
commit6e4a34580d05ca8036c2bc1f7a53558cdc0cc77f (patch)
treeba9a877bc351dbb9462feef291658430a0d5f29f /docs
parent04050bff306c0c609d58a8916a96245aa85c2c31 (diff)
Fixed #28557 -- Fixed ForeignKey/OneToOneField/ManyToManyField argument name in docs.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index ba631850b6..aaa03cac0a 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1137,10 +1137,10 @@ Django also defines a set of fields that represent relations.
``ForeignKey``
--------------
-.. class:: ForeignKey(othermodel, on_delete, **options)
+.. class:: ForeignKey(to, on_delete, **options)
-A many-to-one relationship. Requires a positional argument: the class to which
-the model is related.
+A many-to-one relationship. Requires two positional arguments: the class to
+which the model is related and the :attr:`~ForeignKey.on_delete` option.
.. _recursive-relationships:
@@ -1430,7 +1430,7 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
``ManyToManyField``
-------------------
-.. class:: ManyToManyField(othermodel, **options)
+.. class:: ManyToManyField(to, **options)
A many-to-many relationship. Requires a positional argument: the class to
which the model is related, which works exactly the same as it does for
@@ -1633,7 +1633,7 @@ relationship at the database level.
``OneToOneField``
-----------------
-.. class:: OneToOneField(othermodel, on_delete, parent_link=False, **options)
+.. class:: OneToOneField(to, on_delete, parent_link=False, **options)
A one-to-one relationship. Conceptually, this is similar to a
:class:`ForeignKey` with :attr:`unique=True <Field.unique>`, but the