HTMX
Testing HTMX with Django: Integration Testing Server-Rendered Partials
HTMX turns Django into a hypermedia-first framework where server responses are HTML fragments (partials) instead of JSON. Testing HTMX with Django means testing two layers: server-side partial rendering (Django TestClient with HX-Request header) and browser-side interaction (Playwright E2E). This guide covers both. Key Takeaways Test partials with HX-Request: true header.