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)
def auth_logout(): guest_service.check_guest_out(g.uest) flash('You have been logged out.', 'success') return redirect(users.create_logout_url('/'))
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())'''
def auth_login(origin=None): guest_service.check_guest_out(g.uest) return redirect(users.create_login_url(request.referrer))