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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2005-07-20 21:24:03 +00:00
parent 10ace9a124
commit 65bed3241d
1 changed files with 5 additions and 0 deletions

View File

@ -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: