Facilitates the usage of HTMX with Django
Project description
hx-requests
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
.
- No need to define extra urls to handle these requests
- No need to add anything extra in views
- Reusable
HXRequests
across views - Built in
HXRequests
to reduce boilerplate code
See full documentation here: https://hx-requests.readthedocs.io/en/latest/#
Installation
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>
Contributing to this repository
Warning CI is not setup yet, but will be at a later date.
Getting setup
- This project is using poetry
- There is a dev container that can be used with vs-code
Committing
Must follow Conventional Commit https://www.conventionalcommits.org/en/v1.0.0/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hx_requests-0.31.0.tar.gz
.
File metadata
- Download URL: hx_requests-0.31.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68e1eec096221a6612acd0ff0cbc04f820fa4c31d0ad973f2410236f7563e6c9 |
|
MD5 | 3b49f70d4e914016b6dac2b1cf5fc5f8 |
|
BLAKE2b-256 | 4a246a13a91c2ea9ee804cf71eaa244f5d4d9ef95c8f22944dcc42d2f33f7b26 |
File details
Details for the file hx_requests-0.31.0-py3-none-any.whl
.
File metadata
- Download URL: hx_requests-0.31.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bb6d440aa897be81af28c1140d3ab9b16c5f244b96280583825407b95a36d9a |
|
MD5 | 637cf52ef1a3852e740c463eee21fe85 |
|
BLAKE2b-256 | 282e55feb66a3696d5c84e9686282f71ed0a6a175536691ecde4bcbe7329dbe7 |