Re: Recursive ForeignKey with blank=True

2006-03-19 Thread tonemcd
This works for me David, class Staff(models.Model): name = models.CharField(maxlength=50) reportsTo = models.ForeignKey("self", blank=True, null=True) def __repr__(self): return "%s" % self.name class Admin: list_display = ('name',) This is with the

Re: Recursive ForeignKey with blank=True

2006-03-02 Thread akaihola
Strange, since for me a similar case works in the current magic-removal. And your DB is up-to-date with the Django model? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Recursive ForeignKey with blank=True

2006-03-02 Thread David Ascher
I'm trying to model an employee database, with the reporting relationship modeled as (using magic-removal):class Person(models.Model):    ...    reports_to = models.ForeignKey("self", blank=True, null=True) I need the blank=True because I'd like to avoid the bootstrapping problem in the admin UI