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