5 python flask
我想使用html('<h1>content</h1>')类似 jsonify 之类的东西,而不是使用send_static_file。
html('<h1>content</h1>')
@app.route('/incorrect_pass') def incorrect_pass(): return html('Incorrect password. <a href="/">Go back?</a>')
是我想做的。
小智 6
没关系。应该检查一下。Flask 以 html 形式返回字符串,因此html()上面不需要。
html()
归档时间:
8 年,10 月 前
查看次数:
12784 次
最近记录: