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 post(self): default_image = images.resize(self.request.get("def_img"), 90, 90) defimagedb = DefImageDB(def_image=db.Blob(default_image)) defimagedb.put() self.redirect("/init")
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)