6 ms·
I like web.py's approach to templates. A few simple uses of $, if I remember correctly. A minimalist aesthetic. A typical Python framework's templating system i
by anatoly 17y ago
I like web.py's approach to templates. A few simple uses of $, if I remember correctly. A minimalist aesthetic. A typical Python framework's templating system is contrived and looks ugly by comparison.
- pssdbt 17y agoDjango's template system is the sexiest I've seen (mostly because of the simple syntax and inheritance). I've been meaning to check out web.py for a while now, will have to see how web.py templating compares.
- anatoly 17y agoSorry; when I see those {% %} {{ }} I feel nauseated. Also, it's bizarre to use a language (Python) that uses indentation instead of endif's, closing braces, etc., and then turn around and require endif's and endfor's in your templating system. web.py's templates get that right: just use the Python style.
- jacquesm 17y agoNot only endifs and endfors but also tons of braces...
- benatkin 17y agoOh yeah...endif, endfor, endblock. Oddly, there's no elif tag, though.
- benatkin 17y agoEspecially when they run together, like this: {% block title %}{{ section.title }}{% endblock %}
- pssdbt 17y agoOdd... it's personal preference here then. In my opinion python's style shouldn't be mixed with HTML at all. Again, I still need to look further into web.py's templating, but the endifs/endfors mix with HTML much better than python's style to me.
- erlanger 17y agoMako's the best I've found. Templetor looks nice but is awful because (of all things) whitespace is significant! That's a no-go for a template system.
- apgwoz 17y agoThe best I've ever seen (though I haven't seen an implementation for Python) is straight up x-expessions (sexps) with unquoting and unquote-splicing.