[Flask]路径获取参数方法1 /hello/<name
2018-08-31 本文已影响4人
_小老虎_
@app.route('/hello/')
@app.route('/hello/<name>')
@app.route('/hello/<name>/<age>')
def hello(name='wu',age='0'):
return "{},{}".format(name,age)
@app.route('/hello/')
@app.route('/hello/<name>')
@app.route('/hello/<name>/<age>')
def hello(name='wu',age='0'):
return "{},{}".format(name,age)