Exemplo n.º 1
0
def logout():
    if not "login" in session:
        return redirect(url_for('login'))
    sql.updateLastSeen(session["login"], deco=True)
    session.pop("login", None)
    session.pop("admin", None)
    session.pop("points", None)
    flash("Logout successful", "success")
    return redirect(url_for('mainindex'))
Exemplo n.º 2
0
def before_request():
    if "login" in session:
        sql.updateLastSeen(session["login"])
    g.db = sql.connect_db()