(template_name, extra_vars=None, cache_key=None,
                  cache_type=None, cache_expire=None, method='xhtml')
return cached_template(template_name, render_template, cache_key=cache_key,
                           cache_type=cache_type, cache_expire=cache_expire,
                           ns_options=('method'), method=method)
Render a template with Genshi

    Accepts the cache options ``cache_key``, ``cache_type``, and
    ``cache_expire`` in addition to method which are passed to Genshi's
    render function.
Render a template with Genshi
Render a template with Genshi
def render_genshi(template_name, extra_vars=None, cache_key=None,
                  cache_type=None, cache_expire=None, method='xhtml'):
    """Render a template with Genshi

    Accepts the cache options ``cache_key``, ``cache_type``, and
    ``cache_expire`` in addition to method which are passed to Genshi's
    render function.

    """
    # Create a render callable for the cache function
    def render_template():
        # Pull in extra vars if needed
        globs = extra_vars or {}

        # Second, get the globals
        globs.update(pylons_globals())

        # Grab a template reference
        template = globs['app_globals'].genshi_loader.load(template_name)

        return literal(template.generate(**globs).render(method=method,
                                                         encoding=None))

    return cached_template(template_name, render_template, cache_key=cache_key,
                           cache_type=cache_type, cache_expire=cache_expire,
                           ns_options=('method'), method=method)
def render_genshi ( template_name , extra_vars = None , cache_key = None , cache_type = None , cache_expire = None , method = 'xhtml' ) : # Create a render callable for the cache function def render_template ( ) : # Pull in extra vars if needed globs = extra_vars or { } # Second, get the globals globs . update ( pylons_globals ( ) ) # Grab a template reference template = globs [ 'app_globals' ] . genshi_loader . load ( template_name ) return literal ( template . generate ( * * globs ) . render ( method = method , encoding = None ) ) return cached_template ( template_name , render_template , cache_key = cache_key , cache_type = cache_type , cache_expire = cache_expire , ns_options = ( 'method' ) , method = method )