Flask基本知识


@app.route('/')
def hello_world():
return 'Hello World!'

#route动态Route,支持字符串、整数、浮点数,/user/<int:id>
@app.route('/user/<name>')
def user(name):
return '<h1>Hello,{}!</h1>'.format(name)


if __name__ == '__main__':
app.run()

猜你喜欢

转载自www.cnblogs.com/cuizhx/p/9992221.html
今日推荐