On May 2, 1:32 am, Daniel Roseman <[email protected]>
wrote:
> On May 2, 8:48 am, Anthony <[email protected]> wrote:
> > My model:
>
> > class Bracket(models.Model):
> > m = models.ForeignKey(OtherModel)
> > <- no problem with this
> > parent = models.ForeignKey('self', blank=True, null=True)
> > <- problem with this
> > name = models.CharField(max_length = 30)
>
>
> No, you need to allow null=True on the foreign key, otherwise you
> can't have a top-level parent bracket.
I'm not sure I understand what you mean. My recursive foreign key is
set to 'Null=True'. If you're referring to model 'm', that is a
different foreign key that points to something else. I could leave it
off the model, but it doesn't change my problem.
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---