Mercurial > genshi > mirror
changeset 761:6a424a74f5be trunk
Remove obsolete webpy example.
author | cmlenz |
---|---|
date | Tue, 17 Jun 2008 15:42:38 +0000 |
parents | 9f28d17b1f72 |
children | df2eda814f2d |
files | examples/webpy/README.txt examples/webpy/hello.html examples/webpy/hello.py |
diffstat | 3 files changed, 0 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
deleted file mode 100644 --- a/examples/webpy/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -Sample application that demonstrates the use of Genshi templates in web.py -(http://webpy.org/). - -Try introducing errors (not just XML well-formedness errors, those are boring) -in the template, and you'll see a nice error screen with pretty good -information about the exact error.
deleted file mode 100644 --- a/examples/webpy/hello.html +++ /dev/null @@ -1,13 +0,0 @@ -<!DOCTYPE html - PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" - xmlns:py="http://genshi.edgewall.org/"> - <body> - <h1>web.py with Genshi</h1> - <hr /> - <ul py:if="times"> - <li py:for="i in range(times)">Hello, $name!</li> - </ul> - </body> -</html>
deleted file mode 100644 --- a/examples/webpy/hello.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -from genshi.template import TemplateLoader -import web - -loader = TemplateLoader([os.path.dirname(os.path.abspath(__file__))], - auto_reload=True) -urls = ('/(.*)', 'hello') - - -class hello(object): - - def GET(self, name): - i = web.input(times=1) - if not name: - name = 'world' - name = name.decode('utf-8') - - tmpl = loader.load('hello.html') - stream = tmpl.generate(name=name, times=int(i.times)) - - web.header('Content-Type', 'text/html; charset=utf-8', unique=True) - print stream.render('html') - - -if __name__ == '__main__': - web.webapi.internalerror = web.debugerror - web.run(urls, globals())