为什么去/ uploads / stack1234会给我404错误?
filed = "stack1234"
@app.route('/uploads/<filed>')
def stack():
return render_template('filed.html')
答案 0 :(得分:0)
stack()
必须定义参数。无需将其定义为全局变量。
@app.route('/uploads/<filed>')
def stack(filed):
return render_template('filed.html')