mirror of https://github.com/django/django.git
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
|
@ -305,6 +305,11 @@ Field Types
|
|||
|
||||
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