📅  最后修改于: 2022-03-11 14:57:41.241000             🧑  作者: Mango
class Symptoms(DynamicSerializer):
class Meta:
model = models.Symptom
fields = ('name',) #< instead of id use other value
class PatientProfiel(DynamicSerializer):
symptoms = SymptSer(many=True) #< it it here
class Meta:
model = MyModel
fields = '__all__'