== Using HTMLTemplate with CherryPy == HTMLTemplate can be [http://freespace.virgin.net/hamish.sanderson/htmltemplate.html downloaded here] === test.html === {{{ #!text/html
Test quote
}}} === test.py === {{{ #!python import cherrypy from HTMLTemplate import Template class Begin: def renderTemplate(self, node, title, quote): node.pagetitle.content = title node.myquote.content = quote @cherrypy.expose def index(self): html = file("test.html").read() template = Template(self.renderTemplate, html) return template.render('Quote of the Day', 'God does not play dice.') cherrypy.quickstart(Begin()) }}} {{{ #!html