django-htmx
Installation
SKILL.md
Django HTMX
Use HTMX to keep Django templates, views, forms, permissions, and server-side validation in charge while adding focused partial-page updates. Prefer plain Django first, then add the smallest HTMX behavior that improves the workflow.
In generated django-saas-starter projects:
django-htmxis installed anddjango_htmx.middleware.HtmxMiddlewareaddsrequest.htmx.htmx.min.jsis copied from npm tofrontend/static/vendors/js/and loaded byfrontend/templates/base_app.htmlandfrontend/templates/base_landing.html.- The base templates already add
X-CSRFTokenduringhtmx:configRequestand setwindow.htmx.config.historyRestoreAsHxRequest = false. Do not duplicate this setup in feature templates. - Use Alpine.js only for browser-local state such as menus, modals, disclosure state, and lightweight transitions.