The good part is that if you start early with a good design, it's fairly clear how to move from views to a REST API (DRF or Django-ninja) later and split the front end if you need to.
I've been learning React / Django / Bootstrap (open to ideas on that, but it's just been "there" for me) / SQLite, Postgres / Stripe for payment, Docker, and hosting on AWS and exploring Fly.IO for hosting. I haven't dug into APIs, but curious your thoughts DRF / FastAPI / Django-ninja).
I know this is a Rails thread, so there might be a better place to have a discussion about it...
Thanks for your insights!
{% macro IssueCard(issue, type) -%}
... lot of HTML
{% endmacro -%}
{% for issue in myissues %}
{% macro IssueCard(issue, 'myissue') %}
{% endfor %}
The alternative is creating template tags, which can be a lot of work, and it gets you out of the templates.I have a folder called macros/ where I put all the macros I need, and then I use the import call from Jinja2.
I agree with you; having long and deeply nested HTML templates creates too much noise when developing. Jinja2 Macros help with that.