def lazy_jinja_template(template_name, name='data', mimetype='text/html'):
    """
    Jinja template renderer that does not render the template at all.
    Instead of returns the context and template object blended together.
    Make sure to add ``giotto.middleware.RenderLazytemplate`` to the output
    middleware stread of any program that uses this renderer.
    """
    def lazy_jinja_renderer(result, errors):
        template = get_jinja_template(template_name)
        context = {name: result or Mock(), 'errors': errors}
        data = ('jinja2', template, context)
        return {'body': data, 'mimetype': mimetype}
    return lazy_jinja_renderer
Jinja template renderer that does not render the template at all.
    Instead of returns the context and template object blended together.
    Make sure to add ``giotto.middleware.RenderLazytemplate`` to the output
    middleware stread of any program that uses this renderer.