With a dtml-script I renders data from a mysql-database. But, sometimes I should like to save the html-code generated by the script. When I try to do this with a pythonscript I run into problems with acquiring the html-code generated by the dtml-script. I looks like the dtml-script does not get the proper namespace. How do I solve this? Flemming
Flemming Bjerke wrote at 2005-5-27 11:20 +0200:
With a dtml-script I renders data from a mysql-database. But, sometimes I should like to save the html-code generated by the script. When I try to do this with a pythonscript I run into problems with acquiring the html-code generated by the dtml-script. I looks like the dtml-script does not get the proper namespace.
Where do you want to store the result and why? One of the easiest solutions would be caching (e.g. by a "RamCacheManager"). -- Dieter
Fredag den 27. maj 2005 15:33 skrev Dieter Maurer:
Flemming Bjerke wrote at 2005-5-27 11:20 +0200:
With a dtml-script I renders data from a mysql-database. But, sometimes I should like to save the html-code generated by the script. When I try to do this with a pythonscript I run into problems with acquiring the html-code generated by the dtml-script. I looks like the dtml-script does not get the proper namespace.
Where do you want to store the result and why? The actual use was to send the resulting html-file as attachment to maililnglist mails.
One of the easiest solutions would be caching (e.g. by a "RamCacheManager"). Well, then I must look at how. Thanks.
Flemming
Flemming Bjerke wrote:
With a dtml-script I renders data from a mysql-database. But, sometimes I should like to save the html-code generated by the script. When I try to do this with a pythonscript I run into problems with acquiring the html-code generated by the dtml-script. I looks like the dtml-script does not get the proper namespace.
What specific errors are you getting? Ironically, given a previous thread, you're likely suffering from not sacrificing the right goat when calling your DTML method. So of course, DTML is great, and eeeevrybody loves it :-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (3)
-
Chris Withers -
Dieter Maurer -
Flemming Bjerke