diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-09-18 22:08:10 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-09-18 22:08:10 +0200 |
commit | ea52b8088b6b0719d428de26c51e96a92cfb66bb (patch) | |
tree | d9ea9692c4bedb68e391cc63a7c784c400f4035d /pyaggr3g470r/views/views.py | |
parent | Removed the article from the table of the page of favorite articles when it i... (diff) | |
download | newspipe-ea52b8088b6b0719d428de26c51e96a92cfb66bb.tar.gz newspipe-ea52b8088b6b0719d428de26c51e96a92cfb66bb.tar.bz2 newspipe-ea52b8088b6b0719d428de26c51e96a92cfb66bb.zip |
With the new version of Flask-Login is_authenticated is now a property.
Diffstat (limited to 'pyaggr3g470r/views/views.py')
-rw-r--r-- | pyaggr3g470r/views/views.py | 6 |
1 files changed, 3 insertions, 3 deletions
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() |