Fair enough Massimo,
I do agree that setting specific examples sometimes can lead to
misinterpretations (sometimes even being plain wrong), as an example,
I have many process currently written in python, which do not provide
any UI, these processes send many emails to different areas of my
company, I have to create these emails in HTML format and add the
appropriate headers to the email and finally send them, this approach
would be ideal, and as you mentioned, I'd be using this in very
specific circumstances.
As for the code in html, I totally agree that python would be great
for defining blocks, or "macros" how we call it in the zope realm (in
ZPT), in ZPT for example, we do not use python, but rather an XML-ized
METAL command, I am still grasping web2py's way of dealing with macros/
blocks/reusable_html, consider the following in zope:
<div metal:use-macro="here/header/macros/standard_header.html" />
All HTML content goes here
<div metal:use-macro="here/header/macros/standard_footer.html" />
In the very simplistic example above, all of our pages share the same
header and footer, every one of our "views" is a simple template with
the header and footer definitions, in web2py, apparently is the
{{extend 'foo.html'}} and {{include 'bar.html'}} directives, pretty
clever, but I must confess that I still need to get a grasp on its
usage.
In any case, thanks for the quick response, I look forward to
converting my two pet projects (
zforum.org) and (
ztracker.org) to
web2py (and of course share it with the community) as soon as I can.
Thanks!
-- sb