From aea1cc7ccc80349e2053685e574d69bfe48a0222 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 31 Aug 2019 13:26:20 +1000 Subject: [PATCH] read secret key from json file --- .gitignore | 1 + webui.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index bee8a64..6f26f70 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__ +config.json diff --git a/webui.py b/webui.py index 57576c9..5502c64 100644 --- a/webui.py +++ b/webui.py @@ -1,7 +1,10 @@ from flask import Flask, render_template, session +import json + +cfg = json.load(open("config.json")) app = Flask(__name__) -app.secret_key = "debug key" +app.secret_key = cfg['secret_key'] @app.route("/") def hello():