1. 作用
处理不同的url请求
2. 操作
......
@app.route('/')
def index():
pass
@app.route('/page/<int: index>', methods=['POST', 'GET'])
def show_page(index):
pass
@app.route('/page/<author>', endpoint='who')
def show_author(author):
pass
处理不同的url请求
......
@app.route('/')
def index():
pass
@app.route('/page/<int: index>', methods=['POST', 'GET'])
def show_page(index):
pass
@app.route('/page/<author>', endpoint='who')
def show_author(author):
pass
本文标题:flask路由
本文链接:https://www.haomeiwen.com/subject/uphjzxtx.html
网友评论