Exemplo n.º 1
0
 def get(self, template_id = None):
     url = self.request.get('url')
     if url:
         #fetch the url then redirect to /makememe/tempalteid
         logging.info("got url is " + url)
         blob_key = meme.fetch_image_to_blobstore(url)
         meme.save_template(blob_key)
         redirect(self, '/makememe/%s' % blob_key)
         return
     render_page(self, 'make_meme', template_id=template_id)
Exemplo n.º 2
0
 def post(self):
     upload_files = self.get_uploads('file')  # 'file' is file upload field in the form
     blob_info = upload_files[0]
     meme.save_template(blob_info.key())
     redirect(self, '/makememe/%s' % blob_info.key())
     '''self.redirect('/i/serve/%s' % blob_info.key())'''