Add the ability to specify additional fields on the user model that can be used for logging in.

This commit is contained in:
Matt Wright
2013-10-16 14:00:36 -04:00
parent 80f5fa8dbb
commit 1ae6bc3cf1
9 changed files with 63 additions and 27 deletions
+1
View File
@@ -30,6 +30,7 @@ def create_app(config, **kwargs):
class User(db.Document, UserMixin):
email = db.StringField(unique=True, max_length=255)
username = db.StringField(max_length=255)
password = db.StringField(required=True, max_length=255)
last_login_at = db.DateTimeField()
current_login_at = db.DateTimeField()