Re: saving inherited model overwrites base model

2019-07-11 Thread Kalev Takkis
If it receives fields from parent model, I would assume it actually has access to them. In my case, 'comment' field queried from child model returns empty while the field in parent has value. Something's definitely wrong here, I removed inheritance and created explicit OneToOne to Contact and no

Re: saving inherited model overwrites base model

2019-07-05 Thread Jani Tiainen
Hi. I think you have a bit confused terms model inheritance and abstract models. Normal model inheritance in Django means that there will be implicit one to one relation to base model. Inherited model still receives all fields from parent model. On save data is just saved to correct models. To bo

saving inherited model overwrites base model

2019-07-05 Thread Kalev Takkis
Hi all, tl;dr: saving inherited model overwrites fields in parent models with empty strings I have the following models: class Contact(models.Model): comment = models.CharField(max_length=255, blank=True) emails = models.ManyToManyField( Email, blank=True, throug