py代码如下:
import web render = web.template.render("templates") urls = ( '/(.*)', 'hello',) app = web.application(urls, globals()) class hello: def GET(self,name): return render.hello2(name) if __name__ == "__main__": app.run()
html代码如下:
$def with(name) <html> <head> <meta http-equiv='content-type',content='text/html;charset=utf-8'> <title>hello</title> </head> <body> <h1>测试</h1> <form action="/blog/123" method="Post"> <input type="text" name="username" value="$name"> <input type="password" name="password" value=""> <input type="submit" value="submit"> </form> </body> </html>
慕函数9285021