From bc34b9ab905488f19c0647f39c034763b5f76543 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 28 Mar 2022 01:02:00 +0200 Subject: [PATCH] Move secret_key to config --- htmx/app.py | 4 +++- htmx/config.py.sample | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 htmx/config.py.sample diff --git a/htmx/app.py b/htmx/app.py index cbe12d7..946e23f 100644 --- a/htmx/app.py +++ b/htmx/app.py @@ -9,11 +9,13 @@ import psycopg2.extras from flask import Flask, request, render_template, render_template_string, session, g, url_for from flask_babel import Babel, _ +import config + logging.basicConfig(format="%(asctime)s %(levelname)s %(name)s %(lineno)d | %(message)s", level=logging.DEBUG) app = Flask(__name__) babel = Babel(app) -app.secret_key = b"1234" # XXX - Should be in config (not in source, but stable across restarts) +app.secret_key = config.secret_key log = logging.getLogger(__name__) diff --git a/htmx/config.py.sample b/htmx/config.py.sample new file mode 100644 index 0000000..2ae096c --- /dev/null +++ b/htmx/config.py.sample @@ -0,0 +1,2 @@ +secret_key = b"1234" # XXX - Should be in config (not in source, but stable across restarts) +