无法重定向到烧瓶中的html页面

时间:2020-06-13 09:17:22

标签: html flask logout

我正在通过flask中的端点返回特定的消息。

  return '''  <h1>  User does not exist </h1>      <a href  = "{{url_for('logout')}}"> Logout </a> '''

我被重定向到该页面,但是当我按注销链接时,我得到该URL不存在。 这是我的注销端点。在任何情况下都可以完美运行。

@app.route('/logout')
def logout():
    # remove the email from the session if it's there
    session.pop('Email', None)
    return redirect(url_for('login'))

对于您帮助我解决此问题的指导,我们将不胜感激。谢谢你。

0 个答案:

没有答案