Created
October 5, 2011 07:46
-
-
Save adaptives/1263890 to your computer and use it in GitHub Desktop.
LPTHW Exercise 50
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 = ( | |
'/', 'index' | |
) | |
app = web.application(urls, globals()) | |
render = web.template.render('templates') | |
class index: | |
def GET(self): | |
greeting = "Hello" | |
return render.index(greeting = greeting) | |
if __name__ == "__main__": | |
app.run() |
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
$def with (greeting) | |
<html> | |
<head> | |
<title>Gothons Of Planet Percal #25</title> | |
</head> | |
<body> | |
$if greeting: | |
I just wanted to say <em style="color: green; font-size: 2em;">$greeting</em>. | |
$else: | |
<em>Hello</em>, world! | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment