Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added note about ForeignKey("self"); fixes #100

git-svn-id: http://code.djangoproject.com/svn/django/trunk@254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 65bed3241d2e5546841f2c370449d67426022a27 1 parent 10ace9a
@jacobian jacobian authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 docs/model-api.txt
View
5 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:

0 comments on commit 65bed32

Please sign in to comment.
Something went wrong with that request. Please try again.