我正在尝试只返回与当前进行呼叫的患者相关的一种治疗。treatment_str = f"Patient ({self.objects.patient}) - {str(self.date_created)}"
return treatment_str 使用以下序列化程序: Got AttributeErrorwhenattempting to get a value for field<
= CharField(max_length=64)AttributeError: Got AttributeErrorwhenattempting to get a value for field `b_field` on我试过以下几句话:
b = BSerializer(source='b.first'
我使用django rest框架来序列化和更新@property字段,但是我得到了错误:
AttributeError: Got AttributeErrorwhenattempting to geta value for field `template` on serializer `PublicationSerializer`.The serializer field might be named incorrectly an