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:
parent
10ace9a124
commit
65bed3241d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue