diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2012-03-14 14:40:05 -0700 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2012-03-14 14:40:05 -0700 |
| commit | 5f78e0ddae457499acf7330de5b203b98ef5539b (patch) | |
| tree | d524de812811d5e1fe9923c132b791c9ab0fc532 /app.py | |
| parent | 43e3df2e9be5719eb032819ee556a58e689fb8bb (diff) | |
redirect to sig page on sig save
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ import random import requests import string -from bottle import post, route, request, run, static_file, template +from bottle import post, route, redirect, request, run, static_file, template CLOUDANT_BASE = 'https://pinkyswear.cloudant.com/pinkyswear/' CLOUDANT_AUTH = ('pinkyswear', 'abc123') @@ -31,6 +31,6 @@ def sig(id='home'): url = CLOUDANT_BASE headers = { 'content-type' : 'application/json' } r = requests.post(url, auth=CLOUDANT_AUTH, data=data, headers=headers) - return r.content + redirect('/s/%s' % json.loads(r.content)['id']) run(host='localhost', port=8000) |
