Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed is_authenticated in the template html files #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/env_settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
MAIL_USERNAME = '[email protected]'
MAIL_PASSWORD = 'password'
MAIL_DEFAULT_SENDER = '"AppName" <[email protected]>'
MAIL_SERVER = 'MAIL_SERVER', 'smtp.gmail.com'
MAIL_SERVER = 'smtp.gmail.com'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to fix this also

MAIL_PORT = 465
MAIL_USE_SSL = True
MAIL_USE_TLS = False
Expand Down
2 changes: 1 addition & 1 deletion app/templates/core/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>Home page</h1>

<p>This page is accessible to any user (signed in or not)</p>

{% if not current_user.is_authenticated() %}
{% if not current_user.is_authenticated %}
<p>
To view the User page, you must
<a href="{{ url_for('user.login') }}">Sign in</a> or
Expand Down
2 changes: 1 addition & 1 deletion app/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div id="header-div" class="clearfix with-margins">
<div class="pull-left"><a href="{{ url_for('core.home_page') }}"><span class="header-title">MyApp</span></a></div>
<div class="pull-right">
{% if current_user.is_authenticated() %}
{% if current_user.is_authenticated %}
<a href="{{ url_for('core.user_profile_page') }}">{{ current_user.first_name or current_user.user_auth.username }}</a>
&nbsp; | &nbsp;
<a href="{{ url_for('user.logout') }}">Sign out</a>
Expand Down