📜  烧瓶会话超时 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.622000             🧑  作者: Mango

代码示例1
from datetime import timedelta
from flask import session, app

@app.before_request
def make_session_permanent():
    session.permanent = True
    app.permanent_session_lifetime = timedelta(minutes=5)