17 lines
409 B
Python
17 lines
409 B
Python
from flask import Flask
|
|
from .routes.main import main_bp
|
|
|
|
def create_app():
|
|
app = Flask(__name__, instance_relative_config=True)
|
|
|
|
# Charge la config par défaut
|
|
app.config.from_object("app.config.Config")
|
|
|
|
# Charge la config sensible (instance/config.py)
|
|
app.config.from_pyfile("config.py", silent=True)
|
|
|
|
# Enregistre les blueprints
|
|
app.register_blueprint(main_bp)
|
|
|
|
return app
|