#NEWLINE# def render_genshi( template_name , extra_vars = None , cache_key = None , cache_type = None , cache_expire = None , method = 'xhtml' ) : #NEWLINE# #INDENT# "Render a template with Genshi\n\n    Accepts the cache options ``cache_key``, ``cache_type``, and\n    ``cache_expire`` in addition to method which are passed to Genshi's\n    render function.\n\n    " #NEWLINE# def render_template( ) : #NEWLINE# #INDENT# globs = ( extra_vars or { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# globs . update ( pylons_globals ( ) ) #NEWLINE# template = globs [ 'app_globals' ] . genshi_loader . load ( template_name ) #NEWLINE# return literal ( template . generate ( ** globs ) . render ( method = method , encoding = None ) ) #NEWLINE# #UNINDENT# return cached_template ( template_name , template_name , cache_key = cache_key , cache_type = cache_type , cache_expire = cache_expire , ns_options = 'method' , method = method )