From a21beefe740e3b06da852e07ab4eff26282aa6bd Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sun, 18 Mar 2018 16:15:48 +0100 Subject: [PATCH] doorlockd.py: switch to config file Signed-off-by: Ralf Ramsauer --- doorlockd-new/config.cfg | 2 ++ doorlockd-new/doorlockd.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 doorlockd-new/config.cfg diff --git a/doorlockd-new/config.cfg b/doorlockd-new/config.cfg new file mode 100644 index 0000000..e5f95eb --- /dev/null +++ b/doorlockd-new/config.cfg @@ -0,0 +1,2 @@ +DEBUG = True +SECRET_KEY = 'foobar' diff --git a/doorlockd-new/doorlockd.py b/doorlockd-new/doorlockd.py index e00d8d4..a2664fb 100755 --- a/doorlockd-new/doorlockd.py +++ b/doorlockd-new/doorlockd.py @@ -39,7 +39,7 @@ default_binddn = 'cn=%s,ou=people,dc=binary-kitchen,dc=de' html_title = 'Binary Kitchen Doorlock (%s - v%s)' % (__status__, __version__) webapp = Flask(__name__) -webapp.config['SECRET_KEY'] = 'foobar' +webapp.config.from_pyfile('config.cfg') socketio = SocketIO(webapp, async_mode=None) Bootstrap(webapp)