#13440: in discussion of ForeignKey(), mention the reverse relationship that is
created
---------------------------+------------------------------------------------
 Reporter:  ccurvey        |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Documentation  |     Version:  1.2-beta  
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 On this page:
 http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey

 Mention that creating a foreign key creates a backref as well.  For
 example;

 {{{
 class Car(models.Model):
     manufacturer = models.ForeignKey('Manufacturer')
     # ...

 class Manufacturer(models.Model):
     # ...
 }}}

 will silently create an attribute of manufacturer called "car_set" that
 contains a list of all the cars associated with that manufacturer.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13440>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to