Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (17 sloc) 397 Bytes
#!/usr/bin/env python
import web
from webtools import *
web.config.debug = True
web.httpserver.runsimple = web.httpserver.runbasic
app = application(globals())
@get("/")
def index():
return 'Welcome home'
@get("/redirect")
def redirect():
raise web.seeother("/")
@get("/users/(.*)")
def user_profile(username):
return 'Hello %s' % username
if __name__ == "__main__":
app.run()