fix: add app-specific templates dir to Jinja loader
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 41s

App templates must override shared templates so calendar pages
can skip the post-specific meta block.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-10 01:36:54 +00:00
parent dd9007d572
commit a868b0a8a3

9
app.py
View File

@@ -1,8 +1,10 @@
from __future__ import annotations
import path_setup # noqa: F401 # adds shared_lib to sys.path
from pathlib import Path
from quart import g
from jinja2 import FileSystemLoader, ChoiceLoader
from shared.factory import create_base_app
@@ -40,6 +42,13 @@ async def events_context() -> dict:
def create_app() -> "Quart":
app = create_base_app("events", context_fn=events_context)
# App-specific templates override shared templates
app_templates = str(Path(__file__).resolve().parent / "templates")
app.jinja_loader = ChoiceLoader([
FileSystemLoader(app_templates),
app.jinja_loader,
])
# Calendars blueprint at root — standalone mode (no post nesting)
app.register_blueprint(
register_calendars(),