diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2012-03-13 23:51:23 -0700 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2012-03-13 23:51:31 -0700 |
| commit | 89d5cd575fb2665a8d4934b635457e79655df893 (patch) | |
| tree | 291f7bb4d428e802fa32807e37d026e50f346f63 | |
| parent | 877986c4eab288a28a183df5e73c89462ec7baf2 (diff) | |
added new sig post method
| -rw-r--r-- | app.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,6 @@ +import random +import string + from bottle import route, run @route('/') @@ -8,4 +11,9 @@ def index(name='home'): def sig(id='home'): return '<p><b>Signature</b></p><p>%s</p>' % id +@post('/s') +def sig(id='home'): + id = ''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(6)) + return id + run(host='localhost', port=8000) |
