--On Freitag, 6. Dezember 2002 21:27 -0500 Chris McDonough <[EMAIL PROTECTED]> wrote:
On Fri, 2002-12-06 at 19:13, Tino Wildenhain wrote:These are exactly the things you shouldn't neither do in DTML nor in ZPT :-)What do you suggest people use for a templating language for email, JavaScript, SQL, etc? I think it's too much to expect them to use Python to do this (esp. wrt SQL methods).
Oh, is it? I'd rather like to write %(name)s %(value)d then <dtml-whatever value> Recently I read the python-dbi spec and its very nice to see what you could do with the above form. There are even standard ways to do multiple querys or function calls. (Hope I can contribute a product for this as time permits)
For E-Mail and Javascript templates I also find it less confusing if I can use %(var)s form. As a general solution for texts one can use "file" which has an edit tab for several releases of zope now. Then use it like this: context.thefile.read() % context.REQUEST.form or whatever seems appropriate to get values from. E-Mail even gets clearer with the solution since you can easyly loop and do whatever instead of multiple <dtml-sendmail> tags. Regards Tino
I'd start the lessons with ZPT to only show static content and may be macros. Then the logical order would be introduction to python scripts without HTML output - only show how they are used to calculate and output simple values, lists, dictionaries and so on. Next chapter should show how one uses the scripts with ZPT to provide output into HTML. Then the usual things like Catalog, ZSQL, important API parts, etc. Don't you think this would be clearer for the beginner?Sure. I'd love to rewrite the entirety of the Zope Book. But please notice that I'm asking for help finishing the existing chapters, so I don't think this is a realistic goal. - C
_______________________________________________
Zope-Dev maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope )