def logout(): if logged_in(): flash('You have been logged out.') auth.logout() else: flash('You are not logged in!') return redirect(url_for('index'))
def logout(): if auth.logged_in(): auth.logout() flash('You have been logged out.') else: flash('Logout Error: You are not logged in.') return redirect('index')
def logout(): # Delete session cookie etc. if auth.logged_in(g_username): auth.logout(g_username) global g_username g_username = "" app.jinja_env.globals.update(g_username="") session['alert-type'] = 'notice' flash('You have been logged out.') else: session['alert-type'] = 'error' flash('You can\'t log out if you aren\'t logged in.') return redirect(url_for('index'))
def logout(): auth.logout() return redirect( url_for("root") )
def get(self): logout() return redirect(url_for('user.login'))