I want to get the logged user in the dehydrate method of the class derived from ModelResource in Tastypie.
How can I do that?
Found it. There is request object in bundle;
def dehydrate(self,bundle):
logged_user = bundle.request.user
...
return bundle
This works fine.