4 ms·
> what pushed you over the edge? Using Tailwind without a frontend js framework. I needed a way to create lightweight “components” ala React but on the backend
by nojs 4y ago
> what pushed you over the edge?
Using Tailwind without a frontend js framework. I needed a way to create lightweight “components” ala React but on the backend, because otherwise you’re either copy pasting classes like mad or (ab)using tailwind’s @apply.
- jereze 4y agoHow do you create your components in Jinja2? Using the include tag?
- nojs 4y agoI am using {% macro %}
- drcongo 4y agoI've been gradually removing all use of Jinja macros from our projects as they make debugging so much more painful. Everything now goes in template globals, which lets you debug them the same as anything else, gives far clearer stack traces and lets you do clever things with caching.
- spapas82 4y agoI had used this project for creating components https://github.com/EmilStenstrom/django-components/ https://github.com/EmilStenstrom/django-components/ Also, for simpler cases I include partial templates.