Serialize Model from Derived (Abstract) Model
问题 I have the following models: class Address(models.Model): first_name = models.CharField(max_length=100) last_name = models.CharField(max_length=100) .... class Meta: abstract = True class BillingAddress(Address): is_default = models.BooleanField() ... class Meta: db_table = 'billing_address' I'm trying to build a serializer for BillingAddress: class AddressSerializer(serializers.ModelSerializer): class Meta: abstract = True model = AddressModel class BillingAddressSerializer(AddressSerializer