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)
| 59 | |
| 60 | |
| 61 | async 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 | |
| 73 | async def _render(template: Template, context: dict, app: Quart) -> str: |
searching dependent graphs…