tomchristie/django-rest-framework — pull request #723 by mjumbewu (2013-03-11 07:38:26+00:00)
Title: Use parent's primary key when model is derived via multitable inheritance

Currently, the following code will fail:

class ParentModel (Model):
name1 = CharField(max_length=100)

class ChildModel (ParentModel):
name2 = CharField(max_length=100)

class DerivedModelSerializer (ModelSerializer):
class Meta:
model = ChildModel

serializer = DerivedModelSerializer(data={
'name1': 'abc', 'name2': 'xyz'
})
assert serializer.is_valid()

DRF will expect parentmodel_ptr to be a field on the serializer. This should not be expected. The given patch fixes this.