# adamchainz/django-htmx

Extensions for using Django with htmx.

Repository: https://github.com/adamchainz/django-htmx
Canonical: https://ross.abutalabs.com/products/django-htmx
Homepage: https://django-htmx.readthedocs.io/
Language: JavaScript
License: MIT
License Family: permissive
Topics: django
Last push: 2026-08-23T22:08:55+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 2145, "days_push": 10, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2004, forks 154 (observed 2026-08-28T04:06:04.653360+00:00)

## What it is
django-htmx provides extensions for integrating htmx with Django, including middleware, template helpers, and request utilities. It simplifies building dynamic, partial-page-update interfaces in Django applications using htmx.

## Use cases
- add htmx support to a Django project
- detect htmx requests in Django views
- render partial HTML responses for htmx
- use htmx template tags in Django templates
- build dynamic Django pages without heavy JavaScript

## When to choose
- you use Django and want first-class htmx integration
- you want middleware and helpers maintained by a trusted Django developer
- you prefer server-rendered interactivity over a JavaScript SPA framework

## When to avoid
- your project does not use Django
- you build a fully client-side SPA without htmx
- you need a general-purpose htmx server integration for another framework

## Facets
- artifact type: library
- maturity: active
- function: middleware, templating, web-framework
- domain: web-development, backend, frontend
- platform: python
- tags: django, htmx, pypi-package, web-server

## Member repositories
- adamchainz/django-htmx (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:04.653360+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:01:35.965255+00:00, confidence not recorded.
  - readme: https://github.com/adamchainz/django-htmx (fetched 2026-08-28T04:06:04.653360+00:00, sha 82bcfbaed094)
- Data as of 2026-08-30T08:39:29.467469+00:00.
