summaryrefslogtreecommitdiff
path: root/docs/ref
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 21:44:06 -0400
commitd236f30237357d43530266d067d227225e0f5e77 (patch)
tree40167669a0750924ae784cdb3a4ad61858d45d9c /docs/ref
parent8d66bffbae8e5a230da51c7638d24fdbd327a96b (diff)
[1.11.x] Fixed #28557 -- Fixed ForeignKey/OneToOneField/ManyToManyField argument name in docs.
Backport of 6e4a34580d05ca8036c2bc1f7a53558cdc0cc77f from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/fields.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 487de45641..f20dfcaefc 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -1154,10 +1154,12 @@ 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.
+(``on_delete`` isn't actually required, but not providing it gives a
+deprecation warning. It will be required in Django 2.0.)
.. _recursive-relationships:
@@ -1452,7 +1454,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
@@ -1655,7 +1657,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