Re: model referencing itself

2007-01-05 Thread Aidas Bendoraitis
I think, you will also need related_name parameter for your relating fields. Regards, Aidas Bendoraitis aka Archatas On 1/5/07, Jorge Gajon <[EMAIL PROTECTED]> wrote: Hi Aljosa, On 1/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: > > i'm trying to create a model which referencing

Re: model referencing itself

2007-01-04 Thread Jorge Gajon
Hi Aljosa, On 1/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: i'm trying to create a model which referencing itself and for this code i get this error: "name 'Chapter' is not defined" how do i do this or something similar? code: >>> from django.db import models class

RE: model referencing itself

2007-01-04 Thread Chris Brand
i'm trying to create a model which referencing itself The documentation says : To create a recursive relationship -- an object that has a many-to-one relationship with itself -- use models.ForeignKey('self'). Chris --~--~-~--~~~---~--~~ You received this

model referencing itself

2007-01-04 Thread Aljosa Mohorovic
i'm trying to create a model which referencing itself and for this code i get this error: "name 'Chapter' is not defined" how do i do this or something similar? code: from django.db import models class Chapter(models.Model): name = models.CharField(maxlength=200) content =