You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So... the first take would be Just use it! 😅 HTMX works great with Neapolitan. I'm using it myself daily, and I highly recommend it.
I guess, the Tip would be to (first-pass) use hx-select to pick just a part of the response to swap-in, and then (bit more advanced) set self.template_name in the view (or overriding get_template_names()) to specify an HTMX specific template.
I created my package django-template-partials in order to aid this second use case. You can define your partials in your main template and then reference them by name later on. I'd recommend checking that out.
As I say, I'm using this daily. I find the combination of Neapolitan's CRUDView, django-template-partials, and HTMX to be really powerful. It gives me pretty much everything I want. I add a sprinkle of JS using Alpine.js, and that's about it. I'm not finding that I need to reach for much more.
django-htmx might be worth a mention too. I have been using it with neapolitan + django-template-partials along with this pattern. (pulled this snippet from a production website)
Hey Carlton - any suggestions on how to integrate this with htmx, or should i consider a different approach?
The text was updated successfully, but these errors were encountered: