summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2012-03-14 00:01:56 -0700
committerYuval Adam <yuv.adm@gmail.com>2012-03-14 00:02:05 -0700
commitfaf3ad786b062d422377c26b18f194026b296182 (patch)
tree86f688c83c46b211d79f5722269dd0ee7829d799 /app.py
parent97b9d3a453dd34eefe0527bf034053e75fe4a38c (diff)
this should (not) work
Diffstat (limited to 'app.py')
-rw-r--r--app.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/app.py b/app.py
index 4b544c6..439c6ae 100644
--- a/app.py
+++ b/app.py
@@ -1,8 +1,9 @@
import os
import random
+import requests
import string
-from bottle import post, route, run, static_file
+from bottle import post, route, request, run, static_file
@route('/')
def index(name='home'):
@@ -14,7 +15,10 @@ def sig(id='home'):
@post('/s')
def sig(id='home'):
+ data = request.POST.output
id = ''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(6))
+ url = 'https://pinkyswear:abc123@pinkyswear.cloudant.com/pinkyswear/%s' % id
+ requests.post(url, data=data)
return id
run(host='localhost', port=8000)