2 ms·
> purist approach ("keep logic out of templates") sounds good, but in practice leads to spaghetti hacks This. Exactly this Go for Jinja2 and don't look back
by raverbashing 4y ago
> purist approach ("keep logic out of templates") sounds good, but in practice leads to spaghetti hacks
This. Exactly this
Go for Jinja2 and don't look back
If there's one defect in Django is the rosy-colored purist view that permeates a lot of its design decisions.
Keeping "logic only in code" made sense in the 90s. And no, I'm not building a new template tag every time I make some stylistic choice.
- spapas82 4y agoAbout the purist view on Django: The django templates don't annoy me that much, but what is really annoying is the avoidance of using thread locals in Django. This makes very difficult stuff that would be trivial in other frameworks (ie flask), like getting the current user.