Re: model self reference

2007-10-07 Thread Russell Keith-Magee
On 10/8/07, cjl <[EMAIL PROTECTED]> wrote: > > I'm a newcomer, so forgive my ignorance, but what real world > situations are recursive relationships good for? > > I was reading: > > http://www.djangoproject.com/documentation/model-api/#relationships > > They mention "recursive relationships", but

Re: model self reference

2007-10-07 Thread cjl
I'm a newcomer, so forgive my ignorance, but what real world situations are recursive relationships good for? I was reading: http://www.djangoproject.com/documentation/model-api/#relationships They mention "recursive relationships", but I couldn't really figure out what real world problem this

Re: model self reference

2007-10-07 Thread James Bennett
On 10/7/07, Oleg Korsak <[EMAIL PROTECTED]> wrote: > hello! is it possible to do something like that?: > > class ModelClass(models.Model): > parent = models.ForeignKey(ModelClass,blank=True,null=True) Yes, and the exact technique you'll need is covered in the documentation. -- "Bureaucr

model self reference

2007-10-07 Thread Oleg Korsak
hello! is it possible to do something like that?: class ModelClass(models.Model): parent = models.ForeignKey(ModelClass,blank=True,null=True) signature.asc Description: OpenPGP digital signature