Basic architecture
This commit is contained in:
1 parent
f787232548
commit
ad1dcfb1d7
7 files changed
+66
No files matched your search
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in new issue
Block a user