Skip to content

Comment on Simplify templating with node.js, jsdom 0.2.0 and weldparent

Comments

Presentation logic requires logic. If a designer decides to display a bunch of items as three columns rather than two columns, or to switch the display for a single item vs a number of different items, that's presentation logic. Ideally it should go in the template, if that's where you've chosen to keep it.

With Django, I often find myself writing view logic to support specific presentation tasks (regrouping items in a manner more complicated than Django's {% regroup %} template tag allows, for example). This used to bother me, but then I decided that pragmatism beats purity if you actually want to ship anything.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.