jinja2 recipes
2 tested jinja2 integration recipes with FastAPI, httpx, markupsafe. Exact pinned versions and a last-passed receipt, last run 2026-10-15.
passed6/6python
FastAPI Jinja2 full pages vs HTMX partials via HX-Request
Serve a full HTML page to normal browsers and a bare HTML fragment to HTMX requests, chosen by the HX-Request header, with Vary set for caches. Tested offline with the sync TestClient.
fastapi@0.143.1jinja2@3.1.6httpx@0.28.1
last passed 2026-10-15 14:12 UTC
passed6/6python
Jinja2 sandboxed email templates with autoescape and custom filters
A Jinja2 environment with FileSystemLoader, per-extension autoescape, StrictUndefined, custom filters returning Markup, and a sandbox, tested offline against temporary templates.
jinja2@3.1.6markupsafe@3.0.4pytest@9.1.1
last passed 2026-10-15 14:14 UTC