2👍
Why are you trying to create instances of ImageResource
? That makes no sense.
obj_get
is a method for a tastypie resource, which is part of the resource flow chart. It expects a bundle
object.
obj_get(self, bundle, **kwargs): ...
You do not have to create a resource on the fly for every image you upload, you don’t even need to instantiate one, as the url module does this for you.
I recommend you re-read the documentation and register an ImageResource
and/or AlbumResource
accordingly. Those resources will pickup uploaded images or albums automatically after you register the resources to your urls module.
Source:stackexchange.com