| ▲ | chistev 14 hours ago | ||||||||||||||||
But you could already reuse templates in Django by including them. What am I missing? | |||||||||||||||||
| ▲ | teagee 14 hours ago | parent | next [-] | ||||||||||||||||
Check out the HTMX example in the blog, this helped me better understand how it could be used https://adamj.eu/tech/2025/12/03/django-whats-new-6.0/#rende... | |||||||||||||||||
| |||||||||||||||||
| ▲ | WD-42 13 hours ago | parent | prev | next [-] | ||||||||||||||||
Partialdef inline is the real win. Lets you define parts of a page without needing to place them in another file. Reduces the mental overhead of imagining how the inclusion will look because it’s already there. The use case is mainly driven by htmx where you will have lots of these partials and the view code renders them as individual responses. | |||||||||||||||||
| ▲ | JodieBenitez 7 hours ago | parent | prev [-] | ||||||||||||||||
It's just syntactic sugar, making life a bit easier for HTMX users (cf. "htmx was the main motivation for this feature"). I'm using Unpoly and I just render the whole page and let Unpoly swap the content according to the target selectors, so no need for this. Not much difference in perf if you dont generate gigantic pages with heavy header/footer. | |||||||||||||||||