summaryrefslogtreecommitdiff
path: root/app.py
blob: f3982aaa4da29dac5c3688bcf22c08959342872a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import random
import string

from bottle import route, run

@route('/')
def index(name='home'):
    return '<p><b>Homepage</b></p><p>Insert widget here</p>'

@route('/s/:id')
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)