aboutsummaryrefslogtreecommitdiff
path: root/wqflask/secure_server.py
diff options
context:
space:
mode:
authorSam2013-05-09 22:28:22 +0000
committerSam2013-05-09 22:28:22 +0000
commit1cf6894c7416f879fcd114ae7358bb7d4169a677 (patch)
tree457768e0ea50ac9811c981cfdb6728b2da317896 /wqflask/secure_server.py
parenteddd1badf9b1c84e16f9e461ee9920554ebd8c5a (diff)
downloadgenenetwork2-1cf6894c7416f879fcd114ae7358bb7d4169a677.tar.gz
Working on user registration
Diffstat (limited to 'wqflask/secure_server.py')
-rw-r--r--wqflask/secure_server.py9
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'))