22 lines
578 B
Python
22 lines
578 B
Python
from flask import Flask
|
|
|
|
from app.config import load_config
|
|
from photoflow.ui import register_shared_ui
|
|
|
|
|
|
def create_app(config=None) -> Flask:
|
|
app = Flask(__name__)
|
|
cfg = config or load_config()
|
|
app.config["APP_CONFIG"] = cfg
|
|
app.config["DATA_DIR"] = cfg.data_dir
|
|
|
|
register_shared_ui(app)
|
|
|
|
from app.routes.nav import bp as nav_bp
|
|
from app.routes.review import bp as review_bp
|
|
from app.routes.proxy import bp as proxy_bp
|
|
app.register_blueprint(nav_bp)
|
|
app.register_blueprint(review_bp)
|
|
app.register_blueprint(proxy_bp)
|
|
return app
|