When building out apps with #HTMX, I end up with views and templates for both "pages" and (lots of) “partials”. Does anyone have any tips for organizing those two things?

It feels kind of messy in a way that having the strict boundary of a separate API doesn’t. (Although having a separate frontend framework just to client-side render HTML is messy in a whole other way)

Maybe just being more disciplined about routing and naming the partial templates would solve some of this…

@adamghill check out my article https://www.loopwerk.io/articles/2025/alpine-ajax-django/. It’s about Alpine AJAX but it’s exactly the same with htmx (just the header has a different name). Article has examples on how to integrate with template partials.
Beyond htmx: building modern Django apps with Alpine AJAX

Ditch the complex SPA. Learn how to build modern, server-rendered Django apps using Alpine AJAX and the power of hypermedia.

Loopwerk
@kevinrenskers This is great, thanks!