diff options
Diffstat (limited to 'wqflask/secure_server.py')
-rw-r--r-- | wqflask/secure_server.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/wqflask/secure_server.py b/wqflask/secure_server.py index 5448dbeb..60f6db44 100644 --- a/wqflask/secure_server.py +++ b/wqflask/secure_server.py @@ -7,6 +7,11 @@ from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin +# Setup mail +from flask.ext.mail import Mail +mail = Mail(app) + + # Create database connection object db = SQLAlchemy(app) @@ -26,13 +31,13 @@ class User(db.Model, UserMixin): password = db.Column(db.String(255)) active = db.Column(db.Boolean()) confirmed_at = db.Column(db.DateTime()) - + last_login_at = db.Column(db.DateTime()) current_login_at = db.Column(db.DateTime()) last_login_ip_= db.Column(db.String(39)) current_login_ip = db.Column(db.String(39)) login_count = db.Column(db.Integer()) - + roles = db.relationship('Role', secondary=roles_users, backref=db.backref('users', lazy='dynamic')) |