diff options
| -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) |
