小编Sab*_*sla的帖子

Python 重定向(有延迟)

所以我在 Flask 上运行了这个 python 页面。它工作得很好,直到我想要重定向。

@app.route("/last_visit")
def check_last_watered():
    templateData = template(text = water.get_last_watered())
    return render_template('main.html', **templateData)
    return redirect(url_for('new_page')) #with a delay here of 3 secs
Run Code Online (Sandbox Code Playgroud)

该网站工作正常,但不重定向,我不知道如何延迟整个事情。想法...请:-)

python redirect flask

7
推荐指数
2
解决办法
8508
查看次数

标签 统计

flask ×1

python ×1

redirect ×1