aboutsummaryrefslogtreecommitdiff
path: root/wqflask/secure_server.py
diff options
context:
space:
mode:
authorZachary Sloan2013-03-22 23:29:55 +0000
committerZachary Sloan2013-03-22 23:29:55 +0000
commit05f4cfc55a6473cb438ce0059d6d37f913abcb01 (patch)
tree6f72ee7498d802e79051f054570ff9b278876f5a /wqflask/secure_server.py
parentb0cb34e8e4ddf09b0cfe3081439610c6f6d0341c (diff)
downloadgenenetwork2-05f4cfc55a6473cb438ce0059d6d37f913abcb01.tar.gz
Began creating templates for login/registration
Diffstat (limited to 'wqflask/secure_server.py')
-rw-r--r--wqflask/secure_server.py24
1 files changed, 6 insertions, 18 deletions
diff --git a/wqflask/secure_server.py b/wqflask/secure_server.py
index 49e0b433..425fce89 100644
--- a/wqflask/secure_server.py
+++ b/wqflask/secure_server.py
@@ -4,15 +4,8 @@ from wqflask import app
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
-from flask.ext.security import Security, SQLAlchemyUserDatastore, \
- UserMixin, RoleMixin
+from flask.ext.security import Security, SQLAlchemyUserDatastore, UserMixin, RoleMixin
-# Create app
-#app = Flask(__name__)
-app.config['SECRET_KEY'] = 'LjfrbDOlvdFMT5cCi9qrJqStxK4NcmxW'
-app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://webqtl:f2ZypIflRM@gn.cazhbciu2y1i.us-east-1.rds.amazonaws.com/db_webqtl'
-#app.config['SECURITY_CONFIRMABLE'] = True
-app.config['SECURITY_TRACKABLE'] = True
# Create database connection object
db = SQLAlchemy(app)
@@ -48,19 +41,14 @@ user_datastore = SQLAlchemyUserDatastore(db, User, Role)
security = Security(app, user_datastore)
# Create a user to test with
-#@app.before_first_request
-def create_user():
- db.create_all()
- user_datastore.create_user(email='matt@example.com', password='notebook')
- db.session.commit()
+##@app.before_first_request
+#def create_user():
+# db.create_all()
+# user_datastore.create_user(email='matt@example.com', password='notebook')
+# db.session.commit()
-## Views
-#@app.route('/')
-#def home():
-# return render_template('index.html')
import logging
-#from themodule import TheHandlerYouWant
file_handler = logging.FileHandler("/tmp/flask_gn_log")
file_handler.setLevel(logging.DEBUG)
app.logger.addHandler(file_handler)