summaryrefslogtreecommitdiff
path: root/docs/model-api.txt
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2005-07-20 21:24:03 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2005-07-20 21:24:03 +0000
commit65bed3241d2e5546841f2c370449d67426022a27 (patch)
treeed269f120bf74263193f6e4bb763e6b28bab29d9 /docs/model-api.txt
parent10ace9a124014333fd0a74ba1645ad0c23dee38b (diff)
Added note about ForeignKey("self"); fixes #100
git-svn-id: http://code.djangoproject.com/svn/django/trunk@254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/model-api.txt')
-rw-r--r--docs/model-api.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt
index 756e19c7b6..f605f77756 100644
--- a/docs/model-api.txt
+++ b/docs/model-api.txt
@@ -304,6 +304,11 @@ Field Types
many toppings on a pizza)::
meta.ForeignKey(Pizza)
+
+ .. admonition:: Note
+
+ To create a recursive relationship, use a ``ForeignKey`` that relates
+ to ``"self"`` (i.e. ``meta.ForeignKey("self")``).
``ForeignKey`` fields take a large number of extra arguments for defining how
the relationship should work. All are optional: