Every line of 'flask render_template' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
52 def render_template(template, **context): 53 return Response(jinja_env.get_template(template).render(**context), mimetype='text/html')
22 def render_template(self, template_name, **kwargs): 23 values = {} 24 for f in app.get_context_processors(): 25 values.update(f(self)) 26 values.update(kwargs) 27 return render_template(template_name, **values)
56 def render_template(self, template_name, **context): 57 t = self.jinja_env.get_template(template_name) 58 return Response(t.render(**context), mimetype='text/html')
79 async def render_template(template_name_or_list: Union[str, List[str]], **context: Any) -> str: 80 """Render the template with the context given. 81 82 Arguments: 83 template_name_or_list: Template name to render of a list of 84 possible template names. 85 context: The variables to pass to the template. 86 """ 87 await current_app.update_template_context(context) 88 template = current_app.jinja_env.get_or_select_template(template_name_or_list) 89 return await _render(template, context)