[Answer]-Django: How to save inherited models?

1👍

Because you haven’t declared your Conversation model to be abstract. You’re using multi-table inheritance. Have a look at the docs.

If you want all the data stored in your child then you should do something like –

class ConversationBase(models.Model):
    contact             = models.ForeignKey(Contact)
    conversation_datetime = models.DateTimeField()    
    notes               = models.TextField(_(u'Notes'),        blank=True)  

    class Meta:
        absract = True

class Conversation(ConversationBase):
    pass

class ConversationHistory(ConversationBase):
    log_date_time = CreationDateTimeField()

Leave a comment