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,9 +11,10 @@ from ITPlanning.frontend import frontend
logger = logging.getLogger("ITPlanning")
def create_app():
def create_app(config):
"""Flask app creation"""
app = Flask(__name__, static_folder="static", template_folder="view")
if not config:
config = IniConfig()
app.config.from_object(config)