def get(self): user_id = db.get(self.request.get("img_id")) if user_id.user_image: self.response.headers['Content-Type']="image/png" self.response.out.write(user_id.user_image) else: defimagedb=DefImageDB.all().fetch(1) for i in defimagedb: self.response.out.write(i.def_image) break
def get(self): defimagedb = DefImageDB.all().fetch(1) key = "no_key_found" for i in defimagedb: key = i.key() self.pass_template_value_init_page(image_id_key=key)