MCPcopy
hub / github.com/pallets/werkzeug / render_template

Function render_template

examples/plnt/utils.py:62–66  ·  view source on GitHub ↗

Render a template into a response.

(template_name, **context)

Source from the content-addressed store, hash-verified

60
61
62def render_template(template_name, **context):
63 """Render a template into a response."""
64 tmpl = jinja_env.get_template(template_name)
65 context["url_for"] = url_for
66 return Response(tmpl.render(context), mimetype="text/html")
67
68
69def nl2p(s):

Callers 2

indexFunction · 0.70
aboutFunction · 0.70

Calls 2

ResponseClass · 0.90
renderMethod · 0.80

Tested by

no test coverage detected