I am looking for a python web templating engine that works like this:
<table>
<%
for item in items:
%>
<tr>
<th>Name</th>
<td><%= item.name %></td>
</tr>
<%
%>
</table>
I have worked with PHP before so this seems nice to me. I have looked here http://wiki.python.org/moin/Templating but I cant find exactly what Im looking for
4 Answers 4
Jinja2 — inspired by Django templates, but much improved, text-based. And speaking of Django, you probably want to pick a framework before you pick a template engine.
Comments
I would try Mako
Comments
It's a lot more than just a template engine... But I'm a huge Django fan
Comments
You're most probably looking for Jinja, http://jinja.pocoo.org/docs/
Also, you might want to familiarise yourself with Web2Py, Flask or Django.