def login(): return redirect(cheezapi.auth_uri())
def submit(id): if cheezapi.user(): asset = cheezapi.submit('http://' + bucket()+ '/' + id + '.gif') return redirect(asset['items'][0]['share_url']) return redirect(cheezapi.auth_uri(id))