diff options
Diffstat (limited to 'pyaggr3g470r/__init__.py')
-rw-r--r-- | pyaggr3g470r/__init__.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py index 16bdc57f..d29b1373 100644 --- a/pyaggr3g470r/__init__.py +++ b/pyaggr3g470r/__init__.py @@ -2,12 +2,10 @@ # -*- coding: utf-8 -*- import os - from flask import Flask -from flask.ext.mongoengine import MongoEngine +from flask.ext.sqlalchemy import SQLAlchemy import conf -from models import * # Create Flask application app = Flask(__name__) @@ -15,8 +13,9 @@ app.debug = True # Create dummy secrey key so we can use sessions app.config['SECRET_KEY'] = os.urandom(12) +app.config['SQLALCHEMY_DATABASE_URI'] = conf.SQLALCHEMY_DATABASE_URI +db = SQLAlchemy(app) -app.config['MONGODB_SETTINGS'] = {'DB': conf.DATABASE_NAME} app.config["MAIL_SERVER"] = conf.MAIL_HOST app.config["MAIL_PORT"] = conf.MAIL_PORT app.config["MAIL_USE_TLS"] = conf.MAIL_TLS @@ -24,10 +23,6 @@ app.config["MAIL_USE_SSL"] = conf.MAIL_SSL app.config["MAIL_USERNAME"] = conf.MAIL_USERNAME app.config["MAIL_PASSWORD"] = conf.MAIL_PASSWORD -# Initializes the database -db = MongoEngine(app) -db.init_app(app) - from flask.ext.mail import Message, Mail mail = Mail(app) |