I need to access the HttpRequest object in my Resource’s dehydrate
method.
In the docs, it shows that bundle.request is a valid attribute (it’s
in the resources.html page). When I try to add it to my code, I get an
error claiming that Bundle’ object has no attribute ‘request’.
What gives?
I just had the same problem, but found the correct answer over here:
http://groups.google.com/group/django-tastypie/tree/browse_frm/thread/801f44af3f2dbe7b/a36f303380eacf96
it seems django-tasty-pie version 0.9.9 didn’t have this attribute but version 0.9.10 does!
so if you use buildout, look in to buildout.cfg
under versions:
search for
django-tastypie = 0.9.9remove this one and see what your install picks or replace it with:
I still have this problem, so opened a new link, see:
django-tastypie: Cannot access bundle.request in dehydrate(self,bundle)
in the question above I found out, that using 0.9.10 is not enough, version 1.0.0 beta should do the tric..