[Zope] DocumentTemplates -> static pages
Jeff Bauer
jeffbauer@bigfoot.com
Wed, 28 Jul 1999 14:36:45 -0500
Andreas,
My quick solution was to write an unescape function
and invoke it prior to writing the template values.
def unescape(s):
s = string.replace(s, """, '"')
s = string.replace(s, "<", "<")
s = string.replace(s, ">", ">")
s = string.replace(s, "&", "&")
return s
e.g.: f.write(unescape("%s\n" % myDT))
I hope I'm not doing this the hard way.
-Jeff
Andreas Kostyrka wrote:
> > Is anyone using DocumentTemplate to create static
> > html pages? I'm using it to create dynamic pages,
> > but it's not obvious (unless I look through the
> > source) how I would write the contents directly
> > to an html file (i.e. without producing quote
> > conversions: <html> to: <html>)
> Call it ;)
> dt=DocumentTemplate(...)
> dt(self,arg1=val1)
>
> Hopefully I've remembered right from by Bobo days ;)