I created a simple package to simplify the usage of htmx with django,
check it out if you have a chance and let me know if you think there
could be improvements or if there are any bugs! Thanks!
https://pypi.org/project/simple-django-htmx/
The only comparison to django-htmx is pretty much the name.
There are really 2 main points to the library :
To avoid the messy views you get when you use htmx with django.
With my library the htmx requests manage themselves meaning that you
don’t need to do if htmx request …. else render regular view ,
see the documentation for more details on how that works.
To avoid all the extra urls! You don’t need a new endpoint for every
single request (edit, delete etc.) instead the htmx requests handle
it themselves. (again see documentation for more details)
It also has some built in htmx requests for basic functionality.
If you want a delete button, there’s a built in htmx request that all
you do is pass in the object (to a template tag) that you want to delete
and the built in htmx request will handle it for you!