@app.route('/logout')
def logout():
    session.pop('logged_in', None)
    flash('You were logged out')
    return redirect(url_for('index'))
User logout/authentication/session management.
dataset/ETHPy150Open Akagi201/learning-python/flask/flaskr-tdd/app.py/logout