diff --git a/app/main.py b/app/main.py index 7e02612..16aa2ea 100644 --- a/app/main.py +++ b/app/main.py @@ -128,8 +128,10 @@ def create_app() -> FastAPI: ) # Templates + import json as _json templates_dir = Path(__file__).parent / "templates" templates = Jinja2Templates(directory=str(templates_dir)) + templates.env.filters["tojson"] = _json.dumps # Register UI routes (must come before API to avoid catch-all conflicts) from .ui.routes import router as ui_router, setup_templates