Fix up Flask settings

DEBUG is apparently strongly discouraged. Use --debug instead.
This commit is contained in:
Timotej Lazar 2023-05-29 13:34:44 +02:00
parent 6780f074c7
commit e84cb26dc7

View file

@ -10,8 +10,7 @@ def create_app(test_config=None):
# Ensure all required keys exist.
settings = {
'debug': False,
'secret_key': secrets.token_urlsafe(32),
'secret_key': secrets.token_hex(),
'ldap_host': '',
'ldap_port': '636',
'ldap_user': '',
@ -32,7 +31,6 @@ def create_app(test_config=None):
settings |= db.read('settings')
db.write('settings', settings)
app.config['DEBUG'] = settings.get('debug', False)
app.config['SECRET_KEY'] = settings.get('secret_key', '')
app.config['LDAP_USE_SSL'] = True
app.config['LDAP_HOST'] = settings.get('ldap_host', '')