@admin_bp.before_request
def before_request():
    session.permanent = True
    current_app.permanent_session_lifetime = datetime.timedelta(minutes=int(Setting().get('session_timeout')))
    session.modified = True
@admin_bp.before_request
def before_request():
    session.permanent = True
    current_app.permanent_session_lifetime = datetime.timedelta(minutes=int(Setting().get('session_timeout')))
    session.modified = True