As Randy Barlow said you cannot have the same column name in Document and Media. If you change the name, two tables Document and Image will be created with Media columns in Image and Document has its only Columns. Media refers to Document.
Cheers, Kalyan Lanka On Thu, Jul 9, 2009 at 6:15 PM, sjtirtha <sjtir...@gmail.com> wrote: > > Hi, > > I'm new in Django and now I'm already facing the issue with Model > Inheritance. > Here is my imagination, how the model should like > > class Document(models.Model): > name = ... > type = .... > > > class Media(Document): > link = .... > type = .... > class Meta: > abstract = True > > class Image(Media): > size = ..... > > Is this Model possible? It should only generate two DB tables > (Document and Image), where Image inherits the attributes from Media. > > Steve > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---