I have this tool right here
http://tools.cherrypy.org/wiki/Jinja
but wha开发者_StackOverflow社区t do I do with this?
This tool allows you to render your response using jinga templates. Read the usage...
@cherrypy.expose
@cherrypy.tools.jinja(filename='index.html')
def controller(**kwargs):
return {
} # This dict is the template context
精彩评论