Some of the information here may be outdated, please check the book instead

0) Install Genshi

1) Download this

2) Save it in a place where python can find it

3) in your controller add:

import Genshi4web2py

4) in your actions return

return Genshi4web2py.render(dict(...), request, response)

instead of the usual

return dict(...)

5) To make Genshi the default for all views (instead of of normal web2py template language), at the top of your controller, after importing the Genshi4web2py module, state:

response.postprocessing.append(lambda x: Genshi4web2py.render(x, request, response))

Thanks to Timothy Farrell for submitting this recipe.

© 2008-2010 by Massimo Di Pierro - All rights reserved - Powered by web2py - design derived from a theme by the earlybird
The content of this book is released under the Artistic License 2.0 - Modified content cannot be reproduced.