Login to your account |
Other Options |

There are a number of very powerful template languages available in Python. Some template languages, such as Genshi [genshi.edgewall.org], allow complex Python statements and even full Python code within the template file. Others, such as Django [djangoproject.com] templates, prefer to restrict templates to presentation only and do not allow general Python expressions within the body of the template.
In the context of a web framework, is it better to have the full expressiveness of Python, or restrict templates to presentation only?
NB. You can post code with the [code] bbcode tag. Many languages are supported. e.g.
[code python]
print "Hello, World!"
[/code]
Expressive templates makes for messy and unmaintanable code. Well, not all code needs to be. Expressive templates lets you be lazy.