Re: Custom ForeignKey field validation

2008-01-14 Thread David Grant
On Jan 12, 2008 6:34 AM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Jan 12, 2008 5:28 AM, David Grant <[EMAIL PROTECTED]> wrote: > > > I have a simple category model. They will eventually be chapters in a > > book and I only want entries to go into child categories, not the roots. > > Here's the

Re: Custom ForeignKey field validation

2008-01-12 Thread Karen Tracey
On Jan 12, 2008 5:28 AM, David Grant <[EMAIL PROTECTED]> wrote: > I have a simple category model. They will eventually be chapters in a book > and I only want entries to go into child categories, not the roots. Here's > the models: > > class Category(models.Model): > name = models.CharField (m

Custom ForeignKey field validation

2008-01-12 Thread David Grant
I have a simple category model. They will eventually be chapters in a book and I only want entries to go into child categories, not the roots. Here's the models: class Category(models.Model): name = models.CharField(max_length=120, blank=True) parent = models.ForeignKey('self', null=True,