【发布时间】:2018-04-28 03:09:12
【问题描述】:
我想使用 html('<h1>content</h1>') 之类的东西,而不是使用 send_static_file,有点像 jsonify。
@app.route('/incorrect_pass')
def incorrect_pass():
return html('Incorrect password. <a href="/">Go back?</a>')
是我想做的。
【问题讨论】:
-
只做
return 'Incorrect password. <a href="/">Go back?</a>'。 HTML 是默认的