summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2008-09-01 09:32:41 +0000
committerJames Bennett <ubernostrum@gmail.com>2008-09-01 09:32:41 +0000
commitb085ccce6cc26a16d24e7f6a4649a39fc3237570 (patch)
tree028d1a292f475fcd7f69f8f9e744176eeaba2c2c /docs/ref
parent94da2b811810ae1dd93d3e6883d19e89085eee69 (diff)
Fixed #8730: Incorporated (with minor changes) additions/enhancements to one-to-one docs
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/fields.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index bf5d7b30cd..f5c8f72356 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -883,6 +883,8 @@ that control how the relationship functions.
is not provided, Django will assume a default name based upon the names of
the two tables being joined.
+.. _ref-onetoone:
+
``OneToOneField``
-----------------
@@ -897,13 +899,17 @@ another model in some way; :ref:`multi-table-inheritance` is
implemented by adding an implicit one-to-one relation from the child
model to the parent model, for example.
-One positional argument is required: the class to which the model will
-be related.
+One positional argument is required: the class to which the model will be
+related. This works exactly the same as it does for :class:`ForeignKey`,
+including all the options regarding :ref:`recursive <recursive-relationships>`
+and :ref:`lazy <lazy-relationships>` relationships.
+
+.. _onetoone-arguments:
Additionally, ``OneToOneField`` accepts all of the extra arguments
accepted by :class:`ForeignKey`, plus one extra argument:
-.. attribute: OneToOneField.parent_link
+.. attribute:: OneToOneField.parent_link
When ``True`` and used in a model which inherits from another
(concrete) model, indicates that this field should be used as the