July 2017
Intermediate to advanced
374 pages
8h
English
As you can see, in the preceding section, we provided the route to log out, which, basically, removes the user session, and redirects the user to the login page. The following is the code snippet from app.py:
@app.route("/logout")
def logout():
session['logged_in'] = False
return redirect(url_for('home'))
Now our application is fully built-up, starting from the users logging in, to submitting their tweets, and then logging out.
Read now
Unlock full access