我正在尝试在tastypie中创建一个应用程序。从我看到的教程中,我们可以使用set通过id获取数据。喜欢,
curl "http://localhost:8000/api/v1/entry/set/1;3/"
但这只会带来数据1和3.我可以在tastypie中获取1到3吗?是否有任何功能实现?
编辑:
class OrganisationResource(ModelResource):
create_user = fields.ForeignKey(PersonResource, 'create_user', null=True, full=True)
update_user = fields.ForeignKey(PersonResource, 'update_user', null=True, full=True)
location = fields.ForeignKey(LocationResource, 'location', null=True, full=True)
class Meta:
allowed_methods = ['post','get','delete','patch','put']
queryset = Organization.objects.all()
resource_name = 'organisation'
authorization = Authorization()
authentication = Authentication()
filtering = {"id": ALL}
always_return_data = True