fd8cf83003
Thin Quart blueprint that delegates to GalleryService. Cursor-based scroll returns images + a date_groups summary so the SPA can render year-month headers without re-grouping client-side. Timeline returns year-month buckets for the sidebar jump nav. Jump returns a cursor positioned at a specific year-month so the gallery can scroll to historical periods. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
25 lines
515 B
Python
25 lines
515 B
Python
"""Quart app factory."""
|
|
|
|
import logging
|
|
|
|
from quart import Quart
|
|
|
|
from .api import all_blueprints
|
|
from .config import get_config
|
|
from .frontend import frontend_bp
|
|
|
|
|
|
def create_app() -> Quart:
|
|
cfg = get_config()
|
|
logging.basicConfig(level=cfg.log_level)
|
|
|
|
app = Quart(__name__)
|
|
app.secret_key = cfg.secret_key
|
|
|
|
for bp in all_blueprints():
|
|
app.register_blueprint(bp)
|
|
# Registered last so /api/* routes win over the SPA catch-all.
|
|
app.register_blueprint(frontend_bp)
|
|
|
|
return app
|