Unverified Commit 247e19f4 authored by Serge S. Koval's avatar Serge S. Koval Committed by GitHub

Merge pull request #1624 from jerry-git/fix_1622

Change some flask-login User related methods to properties in the examples
parents 88b3370b d24f9b12
......@@ -32,12 +32,17 @@ class User(db.Model):
password = db.Column(db.String(64))
# Flask-Login integration
# NOTE: is_authenticated, is_active, and is_anonymous
# are methods in Flask-Login < 0.3.0
@property
def is_authenticated(self):
return True
@property
def is_active(self):
return True
@property
def is_anonymous(self):
return False
......
......@@ -27,12 +27,17 @@ class User(db.Document):
password = db.StringField(max_length=64)
# Flask-Login integration
# NOTE: is_authenticated, is_active, and is_anonymous
# are methods in Flask-Login < 0.3.0
@property
def is_authenticated(self):
return True
@property
def is_active(self):
return True
@property
def is_anonymous(self):
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment