django-htmx
Extensions for using Django with htmx.
Decision gist · record as of 2026-08-14
Yes. Active maintenance, no known vulnerabilities, permissive MIT license, and low install friction make it a safe choice. Suitable for Django projects targeting modern Python versions that want to integrate htmx without framework overhead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and Django 5.2+ as runtime dependencies.
- Low install friction with a pure Python wheel.
- Actively maintained with a release 9 days ago and 2003 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
last release 2026-08-05 (9 days) · last repo commit 2026-08-13 · 2,003 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,670,958 downloads/mo, #3,667 on PyPI
Alternatives
Verify before relying
pip install django-htmx
import django_htmx
# In Django view, detect htmx requests
if request.htmx:
return render(request, 'partial.html')- Specific htmx features or request attributes the package exposes beyond basic integration
- Whether middleware is required or optional for core functionality
- Performance characteristics when handling high-volume htmx requests
What it is and what it does
django-htmx bridges Django and htmx by providing server-side utilities to work with htmx's request patterns and response headers. It handles the integration layer that lets Django developers detect and respond to htmx requests, manage partial page updates, and leverage htmx's lightweight interactivity model within a Django application.
The package sits between Django's request/response cycle and htmx's client-side behavior, offering helpers to inspect incoming htmx requests and craft appropriate responses. It depends on Django and asgiref, integrating naturally into existing Django projects without requiring external services or complex setup.
Use it for
- Build dynamic form validation and submission without full page reloads using htmx and Django views
- Implement progressive enhancement in Django templates by adding htmx attributes and handling partial renders
- Create real-time UI updates in Django dashboards by responding to htmx swap requests
- Add lightweight interactivity to Django applications without committing to a heavy JavaScript framework
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, no known vulnerabilities, permissive MIT license, and low install friction make it a safe choice. Suitable for Django projects targeting modern Python versions that want to integrate htmx without framework overhead.
Install
django-htmx on PyPI
Before you install
Low install friction with a pure Python wheel. Actively maintained with a release 9 days ago and 2003 repository stars. Requires Django and asgiref as runtime dependencies.
Requires Python 3.10 or later and Django 5.2+ as runtime dependencies.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most projects.
Quickstart
pip install django-htmx
import django_htmx
# In Django view, detect htmx requests
if request.htmx:
return render(request, 'partial.html')
Verify before relying
- Specific htmx features or request attributes the package exposes beyond basic integration
- Whether middleware is required or optional for core functionality
- Performance characteristics when handling high-volume htmx requests
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesasgirefdjango |
| Maintenance | Actively maintained 9 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,670,958 / month, #3,667 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: Django :: 5.2Framework :: Django :: 6.0Framework :: Django :: 6.1Intended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTyping :: Typed |
Evidence: django_htmx-1.29.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django htmx integration”
- django-htmxProvides Django integration utilities for htmx, enabling server-side…
- pegasus-cliA command-line tool for managing SaaS Pegasus projects, creating…
- litestar-htmxIntegrates HTMX into Litestar web applications, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also litestar-htmx · django-datatables-view · dj-datatables-view · django-markdownx · django-admin-inline-paginator-plus · jinja2-fragments · python-fasthtml · django-unfold · django-stubs-ext · djangorestframework-datatables