On May 2, 1:32 am, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On May 2, 8:48 am, Anthony <alantho...@gmail.com> 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 django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---