在发布/创建新的API对象时,我试图定义要执行的自定义逻辑,但我正在接收错误:"<Appointment: apitest>" needs to have a value for field "appointment" before this many-to-many relationship can be used。 queryset = Appointment.objects.all()
serializer_class = Appo
我的DjangoRestframework中有两个模型。在我的视图中,我想获取所有属性,对于每个属性,我都要获得创建它的用户的配置文件数据。#models.py user =models.ForeignKey(User, on_delete=models.CASCADE)
mobile = models.CharField(