On Fri, 2009-10-23 at 13:22 -0700, David Nolen wrote: > My admin looks something like the following- > > class TitleInline(admin.TabularInline): > model = Title > extra = 1 > > class WorkAdmin(admin.ModelAdmin): > inlines = [TitleInline] > admin.site.register(Work, WorkAdmin) > > > My models look something like this- > > class Work(ArtBaseModel): > def __unicode__(self): > return "Foobar" > > class Title(ArtBaseModel): > """ > Title record. > """ > work = models.ForeignKey(Work, related_name="title_set") > displayString = models.CharField(max_length=1024) > type = models.CharField(max_length=256) > lang = models.CharField(max_length=32) > > def __unicode__(self): > return self.displayString > > > However when I try to add a new work using the admin interface I get: > > <class 'artbase.models.Title'> has more than 1 ForeignKey to <class > 'artbase.models.Work'> > > I'm sure it's a simple mistake on my part. >
What does ArtBaseModel look like, that's the interesting bit. Cheers Tom --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---