Created
October 5, 2011 09:42
-
-
Save adaptives/1264047 to your computer and use it in GitHub Desktop.
LPTHW Exercise 51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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