MCPcopy Create free account
hub / github.com/pallets/quart / render_template_string

Function render_template_string

src/quart/templating.py:61–70  ·  view source on GitHub ↗

Render the template source with the context given. Arguments: source: The template source code. context: The variables to pass to the template.

(source: str, **context: Any)

Source from the content-addressed store, hash-verified

59
60
61async def render_template_string(source: str, **context: Any) -> str:
62 """Render the template source with the context given.
63
64 Arguments:
65 source: The template source code.
66 context: The variables to pass to the template.
67 """
68 await current_app.update_template_context(context)
69 template = current_app.jinja_env.from_string(source)
70 return await _render(template, context, current_app._get_current_object()) # type: ignore
71
72
73async def _render(template: Template, context: dict, app: Quart) -> str:

Callers 8

routeFunction · 0.90
bFunction · 0.90
test_template_renderFunction · 0.90
test_template_globalsFunction · 0.90
test_template_filtersFunction · 0.90
test_template_testsFunction · 0.90

Calls 2

_renderFunction · 0.85

Tested by 8

routeFunction · 0.72
bFunction · 0.72
test_template_renderFunction · 0.72
test_template_globalsFunction · 0.72
test_template_filtersFunction · 0.72
test_template_testsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…