3 ms·
I wonder why he chose Mako as a template system as opposed to Jinja (django style). Looking at the Mako syntax.. it just doesn't make any sense.
by whalesalad 18y ago
I wonder why he chose Mako as a template system as opposed to Jinja (django style). Looking at the Mako syntax.. it just doesn't make any sense.
- FraaJad 18y agoDjango templates are designed to be designer (non-programmer) friendly, becase of its CMS/newspaper origins. Mako's goal is to create a powerful, programmer friendly and FAST templating language . A lot many times having code in templates is a faster way to develop, especially if the presentation layer is mostly intended to be used by a programmer. Also, you can write mako code which has good separation of concerns. How is : <% for r in rows %> ${r.name} <% endfor %> less readable than : {% for r in rows %} {{r.name}} {% endfor %}
- inklesspen 18y agoAs it happens, I advised him on template choice; I recommended both Jinja2 and Mako, and he ended up choosing Mako because it supports embedded arbitrary Python blocks, and Jinja2 does not.