diff --git a/src/.gitignore b/src/.gitignore index a295864..723fb5e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,2 +1,4 @@ *.pyc __pycache__ +config.py + diff --git a/src/app.py b/src/app.py index 7fa75b5..82c12cf 100644 --- a/src/app.py +++ b/src/app.py @@ -18,12 +18,13 @@ from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.orm import sessionmaker +import config # The app app = Flask(__name__) -app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://accountant:accountant@localhost/accountant' -app.config['SQLALCHEMY_RECORD_QUERIES'] = True +app.config['SQLALCHEMY_DATABASE_URI'] = config.db_uri +app.config['SQLALCHEMY_RECORD_QUERIES'] = config.debug db = SQLAlchemy(app) diff --git a/src/config.py.dist b/src/config.py.dist new file mode 100644 index 0000000..1dafb97 --- /dev/null +++ b/src/config.py.dist @@ -0,0 +1,3 @@ + +db_uri='postgresql://accountant:accountant@localhost/accountant' +debug=True