Exemple #1
0
def logout_view():
    user_data = logout()
    if user_data is None:
        msg = 'No user to log out.'
        return render_template('logout.html', msg=msg)
    else:
        msg = 'Logged out user {0}.'.format(user_data['username'])
        return render_template('logout.html', msg=msg)
Exemple #2
0
def logout_view():
    user_data = logout()
    if user_data is None:
        msg = 'No user to log out.'
        return render_template('logout.html', msg=msg)
    else:
        msg = 'Logged out user {0}.'.format(user_data['username'])
        return render_template('logout.html', msg=msg)
Exemple #3
0
def logout_view():
    user_data = logout()
    session.pop('username', None)

    if user_data is None:
        msg = 'No user to log out.'
        #return render_template('logout.html', msg=msg)
        return redirect(url_for('login'))
    else:
        msg = 'Logged out user {0}.'.format(user_data['username'])
        #return render_template('logout.html', msg=msg)
        return redirect(url_for('login'))
Exemple #4
0
def logout_view():
    user_data = logout()
    session.pop('username', None)

    if user_data is None:
        msg = 'No user to log out.'
        #return render_template('logout.html', msg=msg)
        return redirect(url_for('login'))
    else:
        msg = 'Logged out user {0}.'.format(user_data['username'])
        #return render_template('logout.html', msg=msg)
        return redirect(url_for('login'))
Exemple #5
0
def view_logout():
    logout()
    return redirect('/')
def logout_view():
    # remove the username from the session if it's there
    user_data = logout()
    session.pop('username', None)
    flash('Logged out user {0}.'.format(user_data['username']))
    return redirect(url_for('login'))