(template_name, extra_vars=None, cache_key=None,
                cache_type=None, cache_expire=None)
return cached_template(template_name, render_template, cache_key=cache_key,
                           cache_type=cache_type, cache_expire=cache_expire)
Render a template with Mako

    Accepts the cache options ``cache_key``, ``cache_type``, and
    ``cache_expire``.
Render a template with Mako
Render a template with Mako
def render_mako(template_name, extra_vars=None, cache_key=None,
                cache_type=None, cache_expire=None):
    """Render a template with Mako

    Accepts the cache options ``cache_key``, ``cache_type``, and
    ``cache_expire``.

    """
    # 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'].mako_lookup.get_template(template_name)

        return literal(template.render_unicode(**globs))

    return cached_template(template_name, render_template, cache_key=cache_key,
                           cache_type=cache_type, cache_expire=cache_expire)
def render_mako ( template_name , extra_vars = None , cache_key = None , cache_type = None , cache_expire = None ) : # 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' ] . mako_lookup . get_template ( template_name ) return literal ( template . render_unicode ( * * globs ) ) return cached_template ( template_name , render_template , cache_key = cache_key , cache_type = cache_type , cache_expire = cache_expire )