Web development with Python 3.1
Bruno Desthuilliers
bruno.42.desthuilliers at websiteburo.invalid
Thu Oct 29 12:53:44 EDT 2009
Diez B. Roggisch a écrit :
>
> The point is that using templates allows you to express your rendering-logic
> in terms of the desired output language (HTML in this case).
Well, for Django, Mako, Cheetah and quite a few others, this might not
be _that_ true - you can use any of the templating systems to generate
almost any kind of text, not just HTML, and the templating logic itself
is _not_ expressed "in terms of the desired output language" (ie: the
"template langage" elements are not valid HTML).
> And the overall separation of rendering from programming is a *great* thing
> for maintainability.
+1 on this - even if some may argue that this shouldn't prevent you from
using Python to handle the presentation logic (whitespace problems set
aside, and cf Mako and Cheetah).
More information about the Python-list
mailing list