Mercurial > genshi > genshi-test
view examples/cherrypy/index.py @ 514:e293bbb40507
Fixed a bug where select() operated on the entire stream rather than only on
the previous selection. Introduced the end() transformation to reset the
current selection.
author | athomas |
---|---|
date | Wed, 06 Jun 2007 12:51:54 +0000 |
parents | 3879c9ad3472 |
children |
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') if __name__ == '__main__': cherrypy.quickstart(Example(), config='config.txt')