Django components: sometimes an include doesn't cut it

Have you ever wished that Django&rsquo;s include template tag could accept blocks of content? I have. Unfortunately, Django&rsquo;s {% include %} tag doesn&rsquo;t accept blocks of text. Let&rsquo;s look at a few possible solutions to this problem. The Problem: Hack Include Workarounds Let&rsquo;s say we have HTML and CSS that make up a modal that is powered by Alpine.js and HTMX and we want to…