Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Our app has enough going on now that we should add in some basic layout and styling.
Alert!
In this video and the others in this course, you'll see me using {{ current_user.is_authenticated() }}
. At the time of filming, this was the correct way to use the is_authenticated()
method on the UserMixin
from flask-login
. BUT, as is often the case in open source, things have changed. You'll now want to always use it as a property instead. So, use {{ current_user.is_authenticated }}
instead. No parentheses!
New terms
-
current_user
- Global object in templates that represents the current user. -
is_authenticated
- Property oncurrent_user
that returns whether the user is authenticated or not. -
get_flashed_messages(with_categories=True)
- Gets flashed messages with their categories.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up