all i am trying to do is figure out how serve a blob, by using the blobreferenceproperty stored in the datastore.
class data(webapp2.RequestHandler):
def get(self):
a = db.GqlQuery("SELECT * FROM UserPhoto")
blob = a[0].blob_key()
self.redirect('/Serve/%s' % blob())
class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler):
def get(self, photo_key):
if not blobstore.get(photo_key):
self.error(404)
else:
self.send_blob(photo_key)
and the error i get is
TypeError: 'BlobInfo' object is not callable
INFO 2012-07-22 16:28:42,342 dev_appserver.py:2884] "GET /data HTTP/1.1" 500 -
and now im completely lost.
im fairly sure im not far away, because my code is only slightly modified from the working version of the tutorial, but ive tried everything i can think of and i would appreciate a nudge in the right direction.
thanks
Change
blob()toblobin the redirect line.