@app.route(‘/user/<user_id>‘)
@app.route(‘/user/<int:user_id>‘)
自定义正则匹配
from werkzeug.routing import BaseConverter
@app.route(‘/user/regex("[a-z]{3}"):user‘)
时间: 2024-10-09 02:32:25
@app.route(‘/user/<user_id>‘)
@app.route(‘/user/<int:user_id>‘)
自定义正则匹配
from werkzeug.routing import BaseConverter
@app.route(‘/user/regex("[a-z]{3}"):user‘)