Undocumented
Class |
|
A loader that looks for templates in the application and all the blueprint folders. |
Class |
|
Works like a regular Jinja2 environment but has some additional knowledge of how Flask's blueprint works so that it can prepend the name of the blueprint to referenced templates if necessary. |
Function | render |
Render a template by name with the given context. |
Function | render |
Render a template from the given source string with the given context. |
Function | stream |
Render a template by name with the given context as a stream. This returns an iterator of strings, which can be used as a streaming response from a view. |
Function | stream |
Render a template from the given source string with the given context as a stream. This returns an iterator of strings, which can be used as a streaming response from a view. |
Function | _default |
Default template context processor. Injects `request`, `session` and `g`. |
Function | _render |
Undocumented |
Function | _stream |
Undocumented |
t.Union[ str, Template, t.List[ t.Union[ str, Template]]]
, **context: t.Any
) -> str
:
(source)
¶
Render a template by name with the given context. :param template_name_or_list: The name of the template to render. If a list is given, the first name to exist will be rendered. :param context: The variables to make available in the template.
Render a template from the given source string with the given context. :param source: The source code of the template to render. :param context: The variables to make available in the template.
t.Union[ str, Template, t.List[ t.Union[ str, Template]]]
, **context: t.Any
) -> t.Iterator[ str]
:
(source)
¶
Render a template by name with the given context as a stream. This returns an iterator of strings, which can be used as a streaming response from a view. :param template_name_or_list: The name of the template to render. If a list is given, the first name to exist will be rendered. :param context: The variables to make available in the template. .. versionadded:: 2.2
Render a template from the given source string with the given context as a stream. This returns an iterator of strings, which can be used as a streaming response from a view. :param source: The source code of the template to render. :param context: The variables to make available in the template. .. versionadded:: 2.2