htmx is great

I build a small application, and for the first time I used htmx. Unfortunately I must not show you anything, but the htmx library (combined with Bootstrap5) is fun.

1 Like

Did you use Django for the backend?

If so, was there anything noteworthy about your app? Any strange things with integrating Django and htmx?

I’ve had some interest in htmx too, but I haven’t hit a use case for it yet so I’ve not tried it out.

1 Like

htmx works like documented. And questions at Stackoverflow with this tag get answered soon.

I had one small issue: If you want a snippet to do a full-page reload, then the server should send a special http header. But the status code should be 200 (not 302 like in my first implementation).

I documented this here:

For me htmx is like a straight line. The shortest way to get from A to B. Don’t ask me why it took me so long that to discover that something like this is missing.

1 Like

I am happy to see HTMX getting some love here. I had a short conversation on reddit about it. Seems there is a lot more interest, so I started a repo to illustrate basic use cases and code samples on using HTMX and Django.

I use IntercoolerJS, the precursor to HTMX, quite extensively on my projects. Conceptually they are the same. The main difference is a bit of syntax and dropping of the jQUERY dependency.

I added htmx to my project and wrote up a quick article to show the configuration I needed for Django (to handle CSRF) as well as an example.


Thank you,

I have created a simple django app to for those who want to play with htmx:

1 Like

GitHub - adamchainz/django-htmx: Extensions for using Django with htmx. by @adamchainz might be a useful library to integrate Django and htmx in case folks haven’t seen it before.

1 Like

I also have a couple example use cases in the example app in the django-htmx repo.

1 Like

I recently created a small app called AniQuote that generates random anime quotes, primarily using Django and htmx. I wanted to test out htmx and I have to admit htmx is really amazing. I was able to make the site interactive with little to no JavaScript used!

Please spread the good news, so more people can enjoy it.