The Bundle object has a request attribute.
class Bundle(object): """ A small container for instances and converted data for the ``dehydrate/hydrate`` cycle. Necessary because the ``dehydrate/hydrate`` cycle needs to access data at different points. """ def __init__(self, obj=None, data=None, request=None): self.obj = obj self.data = data or {} self.request = request or HttpRequest()
Anyway, you can ovveride the resource method higher than dehydrate in the call stack.
Could you show the code?
source share