Move secret_key to config

This commit is contained in:
Peter J. Holzer 2022-03-28 01:02:00 +02:00
parent ea2a984d24
commit bc34b9ab90
2 changed files with 5 additions and 1 deletions

View File

@ -9,11 +9,13 @@ import psycopg2.extras
from flask import Flask, request, render_template, render_template_string, session, g, url_for from flask import Flask, request, render_template, render_template_string, session, g, url_for
from flask_babel import Babel, _ from flask_babel import Babel, _
import config
logging.basicConfig(format="%(asctime)s %(levelname)s %(name)s %(lineno)d | %(message)s", level=logging.DEBUG) logging.basicConfig(format="%(asctime)s %(levelname)s %(name)s %(lineno)d | %(message)s", level=logging.DEBUG)
app = Flask(__name__) app = Flask(__name__)
babel = Babel(app) 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__) log = logging.getLogger(__name__)

2
htmx/config.py.sample Normal file
View File

@ -0,0 +1,2 @@
secret_key = b"1234" # XXX - Should be in config (not in source, but stable across restarts)