Mercurial > genshi > genshi-test
view examples/cherrypy/index.py @ 326:08ada6b4b767
Fixed `__repr__` of the `QName`, `Attrs`, and `Expression` classes so that the output can be used as code to instantiate the object again.
author | cmlenz |
---|---|
date | Thu, 02 Nov 2006 11:38:10 +0000 |
parents | aa16cebbcfe4 |
children | 3879c9ad3472 |
line wrap: on
line source
import os import sys import cherrypy from genshi.template import TemplateLoader loader = TemplateLoader([os.path.dirname(os.path.abspath(__file__))]) class Example(object): @cherrypy.expose def index(self): tmpl = loader.load('index.html') return tmpl.generate(name='world').render('xhtml') cherrypy.root = Example() if __name__ == '__main__': cherrypy.config.update(file='config.txt') cherrypy.server.start()