我有这样的模式和资源为用户配置文件如何与文件补丁资源
class Profile(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(blank=False, null=False, unique=True)
avatar = models.ImageField(blank=True, null=True)
class ProfileResource(ModelResource):
class Meta:
queryset = Profile.objects.all()
resource_name = 'profiles'
allowed_methods = ['get', 'patch']
当我有尝试修补这个资源,我得到异常:
RawPostDataException("You cannot access body after reading from request's data stream")
要发送测试数据我使用铬扩展
谢谢!这是很棒的解决方案! – Dmitry