0👍
It should work if you define your Officer
model explicitly as abstract
class Meta:
abstract = True
So as a test i slightly modified your base class:
class Officer(models.Model):
name = models.CharField(max_length=255)
class Meta:
abstract = True
And the following works:
>>> General(name='Warfield').save()
>>> G = General.objects.all()[0]
>>> Captain(name='Picard', general=G).save()
>>> C = Captain.objects.all()[0]
>>> C.general.name
u'Warfield'
>>> G.captains.all()[0].name
u'Picard'
👤arie
Source:stackexchange.com