Created
February 4, 2020 05:29
-
-
Save Sanket758/eb37036e38aa41c21e594c2752a84463 to your computer and use it in GitHub Desktop.
web.py Tutorial
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' | |
) | |
render = web.template.render("resources/") | |
app = web.application(urls, globals()) | |
class hello: | |
def GET(self, name, age): | |
if not name: | |
name = 'Sanket' | |
if not age: | |
age = 22 | |
return render.main(name, age) | |
if __name__ == "__main__": | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment