hedron-django
Django adapter for Hedron component rendering and HTMX interactions.
Render components as HttpResponse, map portable InteractionResult values,
reverse URLs via Django’s resolver, and integrate CSRF/session through native
middleware. Shares the hedron-core
renderer with FastAPI and Flask. Does not install FastAPI.
Also ships a first-party bounded QuerySet DataSource and Django forms bridge —
supply an already-authorized base QuerySet; omitted sort/filter allowlists deny
client refinements.
Package maturity: Beta · Train: 0.60.x (published v0.60.0 in-tree; PyPI v0.59.0 until upload) · application pin >=0.59.0,<0.60; repository checkouts use uv sync
Adapter capability readiness is Supported when pinned — see What’s ready.
Install
pip install "hedron-django>=0.59.0,<0.60"
# or
uv add "hedron-django>=0.59.0,<0.60"
Requires Python 3.11–3.14, hedron-core, and Django >=5.2,<6.
Install the AppConfig for system checks:
INSTALLED_APPS = [
# ...
"hedron_django.apps.HedronDjangoConfig",
]
Scaffold a new Django project:
uvx --from "hedron>=0.59.0,<0.60" hedron new --django my-django-app
Quick start
from django.http import HttpRequest
from hedron_core import Heading, Page, Text
from hedron_django import HedronDjango, hedron_view
hedron = HedronDjango()
@hedron_view
def home(request: HttpRequest):
return hedron.respond(
Page(
Heading("Hello Django", level=1),
Text("Native Django URLconf with Hedron components."),
title="Home",
),
request,
)
Wire the view into your URLconf as usual. For HTMX fragments, declare
fragment_regions on @hedron_view and return an InteractionResult.
What this package includes
HedronDjango/respondrendering facade@hedron_viewdecorator with fragment-region policyHedronDjangoConfigsystem checksHedronSecurityHeadersMiddlewarefor portableSecurityPolicyheaders- Forms bridge and bounded QuerySet
DataSource - Job status polling helpers
Links
- Add to an existing Django project
- Adapters API
- Changelog
- Source
- Issues
- Django reference example
hedron-core·hedron·hedron-flask
License
MIT. See the repository license.
Release files for hedron-django 0.60.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hedron_django-0.60.0.tar.gz | 23.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hedron_django-0.60.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.9 kB
Release files / hedron_django-0.60.0.tar.gz
| Download URL | hedron_django-0.60.0.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
745d8a8528b611dee8d1fa80891dd3cf53c2356ed367c88389fd8cd73fb3f489
|
|
BLAKE2b-256 checksum How to use checksums |
b5a40f73c0e4be2a38bf01e29e8a8eefadf7f937f7ca2ad3f31e081714c7d86e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hedron_django-0.60.0-py3-none-any.whl
| Download URL | hedron_django-0.60.0-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d48a0c56a2134c8660a299c76dba942d7cd2737f27d97bb77d8bceb3f84ce0f
|
|
BLAKE2b-256 checksum How to use checksums |
5c169f07e8a893c5690205ae9192e39ac7c5f6b52d8b39f13127a5754e0f2ed3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|