@app.route('/user/<user_id>')
@app.route('/user/<int:user_id>')
自定义正则匹配
from werkzeug.routing import BaseConverter
@app.route('/user/regex("[a-z]{3}"):user')
@app.route('/user/<user_id>')
@app.route('/user/<int:user_id>')
@app.route('/user/regex("[a-z]{3}"):user')
转载于:https://www.cnblogs.com/wuqingzangyue/p/5749934.html