summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2012-03-13 23:40:37 -0700
committerYuval Adam <yuv.adm@gmail.com>2012-03-13 23:51:31 -0700
commit877986c4eab288a28a183df5e73c89462ec7baf2 (patch)
treee047d96c10f75ed7263d160e1048a3ef2110aa7b
parent6f1eda559a482964fe1f6cbea9afd2f0c288d063 (diff)
basic routing
-rw-r--r--app.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/app.py b/app.py
index 57bb5d1..c619a24 100644
--- a/app.py
+++ b/app.py
@@ -1,7 +1,11 @@
from bottle import route, run
-@route('/hello/:name')
-def index(name='World'):
- return '<b>Hello %s!</b>' % name
+@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
run(host='localhost', port=8000)