make it clear if we are on DEV or PROD -> pass env thru app.config to base.html

This commit is contained in:
2021-07-04 20:06:53 +10:00
parent d608531cab
commit e26c992c0f

View File

@@ -13,6 +13,7 @@ from flask_ldap3_login import LDAP3LoginManager
from flask_login import LoginManager, login_user, login_required, UserMixin, current_user
from flask_ldap3_login.forms import LDAPLoginForm
import os
import re
import socket
@@ -29,6 +30,7 @@ app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['ENV'] = os.environ['FLASK_ENV']
app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G')
# ldap config vars: (the last one is required, or python ldap freaks out)