Adding configparser to get config form a .ini
This commit is contained in:
parent
5c9415cf6f
commit
0e51f193c2
|
@ -1,7 +1,15 @@
|
||||||
import logging
|
import logging
|
||||||
|
import configparser
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template
|
||||||
from forms import UserLookupForm
|
from forms import UserLookupForm
|
||||||
|
|
||||||
|
config = configparser.ConfigParser()
|
||||||
|
config.read('config.ini')
|
||||||
|
|
||||||
|
LDAP_SERVER = config.get('LDAP', 'host')
|
||||||
|
LDAP_BIND_DN = config.get('LDAP', 'bind_dn')
|
||||||
|
LDAP_PASSWORD = config.get('LDAP', 'bind_password')
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.logger.setLevel(logging.INFO)
|
app.logger.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue