def render_in_context(context, template_text, html_intent=False):
 env = SandboxedEnvironment(autoescape=html_intent)
 template = env.from_string(template_text)
 return template.render(context.get_variables())

def render_in_context ( context , template_text , html_intent = False ) : env = SandboxedEnvironment ( autoescape = html_intent ) template = env . from_string ( template_text ) return template . render ( context . get_variables ( ) )
render the given jinja2 template text in the script context .