Extensions for using Django with htmx

HTML is an interesting technology for post-loading certain parts of the page.
For example, you can postload certain parts of a page so that it is only visible to users and not to crawlers. For example: forms, advertisements or conversion banners.


<script src="/static/js/htmx.min.js"></script>


<div hx-get="/htmx/cta-content-header.html"

hx-trigger="load delay:1s"

hx-swap="outerHTML">

</div>


<div hx-get="/htmx/services_titel.html"

hx-trigger="load delay:1s"

hx-swap="outerHTML">

</div>


Together with Django you can do more interesting things like partital loading without javascript and such small yet very interesting things


https://django-htmx.readthedocs.io/en/latest/index.html

https://htmx.org/

 

https://fly.io/blog/a-no-js-solution-for-dynamic-search-in-django/ 

Comments