Full documentation: https://hx-requests.readthedocs.io/en/latest/#
Hx-requests is a package to simplify the usage of htmx with Django. It enables an application to make asyncronous requests without clogging up views and urls with extra code. It simplifies making django forms post asyncronously with htmx, and many other awesome features.
The idea of hx-requests is that HXRequests
absorb all htmx requests.
Define an HXRequest
and
observe the magic of hx-requests
.
HXRequests
across viewsHXRequests
to reduce boilerplate codeSee full documentation here: https://hx-requests.readthedocs.io/en/latest/#
pip install hx-requests
INSTALLED_APPS = (
...
'hx_requests',
)
Note
It's assumed that htmx is already included in the base html file. It's also recommended to include hyperscript.
Htmx: <script src="https://unpkg.com/htmx.org@1.8.6"></script>
Hyperscript: <script src="https://unpkg.com/hyperscript.org@0.9.8"></script>
Must follow Conventional Commit https://www.conventionalcommits.org/en/v1.0.0/