htmx and templates - functional approaches?

Hi all -

I am dipping my toe in the water of using htmx. I’m starting with an elaborate ‘polls’ app which has a variable and potentially nested set of questions of different answer types. The tree of questions is the spine of the app and of each page, but I’d like to use htmx to receive updates to people’s answers as they compose them, and update other parts of the page (some of the extra content is answer summaries), and create the whole page.

To do this, I want the whole-page view function to get/post using the individual question htmx functions based on their type. The return type of an individual question’s view function would be ‘rendered’ html (for htmx to insert).
What is the right / best way to incorporate this in the whole-page template?
Make it a context variable that gets rendered (does this even work? with “|safe” filter?) content into the whole-page skeleton template?