def _empty_render(template, context, app): """ Used to monkey patch the render_template flask method when the render_templates property is set to False in the TestCase """ if _is_signals: template_rendered.send(app, template=template, context=context) return ""
def _render(renderer, context, app): """Renders the template and fires the signal""" _renderer = locate(renderer) if not _renderer: raise RendererNotFound(renderer) _context = dict(app.jinja_env.globals, **context) before_render_template.send(app, template=renderer, context=_context) rv = _renderer(_context) template_rendered.send(app, template=renderer, context=_context) return rv
def _empty_render(template, context, app): template_rendered.send(app, template=template, context=context) return ""
def _render(template, context, app): app.update_template_context(context) rv = template.render(**context) template_rendered.send(app, template=template, context=context) return rv