aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/__init__.py')
-rw-r--r--pyaggr3g470r/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py
index 9dae02cb..5044d344 100644
--- a/pyaggr3g470r/__init__.py
+++ b/pyaggr3g470r/__init__.py
@@ -12,10 +12,12 @@ import conf
# Create Flask application
app = Flask(__name__)
-app.debug = True
+app.debug = conf.WEBSERVER_DEBUG
# Create dummy secrey key so we can use sessions
-app.config['SECRET_KEY'] = os.urandom(12)
+app.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None)
+if not app.config['SECRET_KEY']:
+ app.config['SECRET_KEY'] = os.urandom(12)
app.config['SQLALCHEMY_DATABASE_URI'] = conf.SQLALCHEMY_DATABASE_URI
db = SQLAlchemy(app)
bgstack15