make it clear if we are on DEV or PROD -> pass env thru app.config to base.html
This commit is contained in:
2
main.py
2
main.py
@@ -13,6 +13,7 @@ from flask_ldap3_login import LDAP3LoginManager
|
|||||||
from flask_login import LoginManager, login_user, login_required, UserMixin, current_user
|
from flask_login import LoginManager, login_user, login_required, UserMixin, current_user
|
||||||
from flask_ldap3_login.forms import LDAPLoginForm
|
from flask_ldap3_login.forms import LDAPLoginForm
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ app = Flask(__name__)
|
|||||||
|
|
||||||
app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL
|
app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL
|
||||||
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
|
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')
|
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)
|
# ldap config vars: (the last one is required, or python ldap freaks out)
|
||||||
|
|||||||
Reference in New Issue
Block a user