module documentation

Undocumented

Class DispatchingJinjaLoader A loader that looks for templates in the application and all the blueprint folders.
Class Environment 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_template Render a template by name with the given context.
Function render_template_string Render a template from the given source string with the given context.
Function stream_template 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_template_string 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_template_ctx_processor Default template context processor. Injects `request`, `session` and `g`.
Function _render Undocumented
Function _stream Undocumented
def render_template(template_name_or_list: 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.

def render_template_string(source: str, **context: t.Any) -> str: (source)

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.

def stream_template(template_name_or_list: 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

def stream_template_string(source: str, **context: t.Any) -> t.Iterator[str]: (source)

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

def _default_template_ctx_processor() -> t.Dict[str, t.Any]: (source)

Default template context processor. Injects `request`, `session` and `g`.

def _render(app: Flask, template: Template, context: t.Dict[str, t.Any]) -> str: (source)

Undocumented

def _stream(app: Flask, template: Template, context: t.Dict[str, t.Any]) -> t.Iterator[str]: (source)

Undocumented