【发布时间】:2016-06-17 21:33:32
【问题描述】:
我有这个模型和资源用于用户配置文件
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")
为了发送测试数据,我使用了 chrome-extention
【问题讨论】:
标签: python django api rest tastypie