aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyaggr3g470r/templates/layout.html2
-rw-r--r--pyaggr3g470r/views/api/common.py2
-rw-r--r--pyaggr3g470r/views/views.py6
3 files changed, 5 insertions, 5 deletions
diff --git a/pyaggr3g470r/templates/layout.html b/pyaggr3g470r/templates/layout.html
index 9b767649..6b29716b 100644
--- a/pyaggr3g470r/templates/layout.html
+++ b/pyaggr3g470r/templates/layout.html
@@ -36,7 +36,7 @@
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav navbar-right">
- {% if g.user.is_authenticated() %}
+ {% if g.user.is_authenticated %}
<!-- <li><a href="{{ url_for("feed.form") }}"><span class="glyphicon glyphicon-plus-sign"></span> {{ _('Add a feed') }}</a></li> -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
diff --git a/pyaggr3g470r/views/api/common.py b/pyaggr3g470r/views/api/common.py
index acb5dd68..8083cb4c 100644
--- a/pyaggr3g470r/views/api/common.py
+++ b/pyaggr3g470r/views/api/common.py
@@ -45,7 +45,7 @@ def authenticate(func):
if not getattr(func, 'authenticated', True):
logged_in = True
# authentication based on the session (already logged on the site)
- elif 'email' in session or g.user.is_authenticated():
+ elif 'email' in session or g.user.is_authenticated:
logged_in = True
else:
# authentication via HTTP only
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index 560bd382..cf405fe4 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -93,7 +93,7 @@ def on_identity_loaded(sender, identity):
@app.before_request
def before_request():
g.user = current_user
- if g.user.is_authenticated():
+ if g.user.is_authenticated:
g.user.last_seen = datetime.datetime.utcnow()
db.session.add(g.user)
db.session.commit()
@@ -153,7 +153,7 @@ def login():
"""
Log in view.
"""
- if g.user is not None and g.user.is_authenticated():
+ if g.user is not None and g.user.is_authenticated:
return redirect(url_for('home'))
g.user = AnonymousUserMixin()
form = SigninForm()
@@ -197,7 +197,7 @@ def signup():
if int(os.environ.get("SELF_REGISTRATION", 0)) != 1:
flash(gettext("Self-registration is disabled."), 'warning')
return redirect(url_for('home'))
- if g.user is not None and g.user.is_authenticated():
+ if g.user is not None and g.user.is_authenticated:
return redirect(url_for('home'))
form = SignupForm()
bgstack15