class TestResource(ModelResource):
user = fields.ForeignKey(UserResource, 'user')
class Meta:
queryset = Test.objects.all()
resource_name = 'test'
authorization = Authorization()
authentication = BasicAuthentication()
如何获取Test
实际登录用户创建的对象?
所有对象:
http://127.0.0.1:8000/api/test/?format=json