News for hackers. Stuff that matters.
Re:Things I do every time I start a Django project by raverbashing on Friday June 24, 2022 @01:51AM (#31858229)
> 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.

Re:Things I do every time I start a Django project by spapas82 on Friday June 24, 2022 @05:32AM (#31859501)
About 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.