I have a tastypie resource for a model. I also have a view in which a request appears that needs to be serialized and sent to the client. I am looking for a way to let the tastypie resource handle serialization and dehydration of a set of queries.
I see that I can pass one object to
[Resource.build_bundle(self, obj=None, data=None, request=None)][1]
to create a package and then transfer the package to
[Resource.full_dehydrate(self, bundle)][2]
and finally let's call
[Resource.serialize(self, request, data, format, options=None)][3]
on dehydrated data.
But I want to convert a complete set of requests to json, and not just from a single object. Perhaps all I need is a way to convert a complete set of requests into a package.
Any help is appreciated!
shreyj
source share