Skip to content

Instantly share code, notes, and snippets.

@adaptives
Created October 5, 2011 09:42
Show Gist options
  • Save adaptives/1264047 to your computer and use it in GitHub Desktop.
Save adaptives/1264047 to your computer and use it in GitHub Desktop.
LPTHW Exercise 51
import web
urls = (
'/hello', 'Index'
)
app = web.application(urls, globals())
render = web.template.render('templates/')
class Index(object):
def GET(self):
form = web.input(name="Nobody")
greeting = "Hello, %s" % form.name
return render.index(greeting = greeting)
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment