© 1999-2048 dssz.net 粤ICP备11031372号
[其它] python flask中动态URL规则详解
说明:URL是可以添加变量部分的, 把类似的部分抽象出来, 比如: app.route('/example/1/') app.route('/example/2/') app.route('/example/3/') def example(id): return 'example:{ }'.format(id) 可以抽象为: app.route('/example//') def wxample(id): return 'example:{ }'.format(id) 尖括号中的内容是动态的<weixin_38625442> 上传 | 大小:38kb