Question or problem about Python programming:
I didn’t find a good comparison of jinja2 and Mako. What would you use for what tasks ?
I personnaly was satisfied by mako (in a pylons web app context) but am curious to know if jinja2 has some nice features/improvements that mako doesn’t ? -or maybe downsides ?-
How to solve the problem:
Solution 1:
I personally prefer Jinja2’s syntax over Mako’s. Take this example from the Mako website
<%inherit file="base.html"/> <% rows = [[v for v in range(0,10)] for row in range(0,10)] %>% for row in rows: ${makerow(row)} % endfor