Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored July 20, 2005

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  docs/model-api.txt
5  docs/model-api.txt
@@ -304,6 +304,11 @@ Field Types
304 304
     many toppings on a pizza)::
305 305
 
306 306
         meta.ForeignKey(Pizza)
  307
+        
  308
+    .. admonition:: Note
  309
+        
  310
+        To create a recursive relationship, use a ``ForeignKey`` that relates
  311
+        to ``"self"`` (i.e. ``meta.ForeignKey("self")``).
307 312
 
308 313
     ``ForeignKey`` fields take a large number of extra arguments for defining how
309 314
     the relationship should work. All are optional:

0 notes on commit 65bed32

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