add config option to create_app

This commit is contained in:
vincent 2021-06-01 14:15:51 +02:00
parent fcd618db18
commit e251900965

View File

@ -11,10 +11,11 @@ from ITPlanning.frontend import frontend
logger = logging.getLogger("ITPlanning") logger = logging.getLogger("ITPlanning")
def create_app(): def create_app(config):
"""Flask app creation""" """Flask app creation"""
app = Flask(__name__, static_folder="static", template_folder="view") app = Flask(__name__, static_folder="static", template_folder="view")
config = IniConfig() if not config:
config = IniConfig()
app.config.from_object(config) app.config.from_object(config)
# set logger # set logger