class NativeTemplate(Template):
Undocumented
Method | render |
No summary |
Async Method | render_async |
This works similar to render but returns a coroutine that when awaited returns the entire rendered template string. This requires the async feature to be enabled. |
Inherited from Template
:
Class Method | from_code |
Creates a template object from compiled code and the globals. This is used by the loaders and environment to create a template object. |
Class Method | from_module_dict |
Creates a template object from a module. This is used by the module loader to create a template object. |
Class Method | _from_namespace |
Undocumented |
Method | __new__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | _get_default_module |
No summary |
Async Method | _get_default_module_async |
Undocumented |
Method | generate |
No summary |
Async Method | generate_async |
An async version of generate . Works very similarly but returns an async iterator instead. |
Method | get_corresponding_lineno |
Return the source line number of a line number in the generated bytecode as they are not in sync. |
Method | make_module |
No summary |
Async Method | make_module_async |
No summary |
Method | new_context |
No summary |
Method | stream |
Works exactly like generate but returns a TemplateStream . |
Class Variable | _debug_info |
Undocumented |
Class Variable | _uptodate |
Undocumented |
Class Variable | blocks |
Undocumented |
Class Variable | environment |
Undocumented |
Class Variable | filename |
Undocumented |
Class Variable | globals |
Undocumented |
Class Variable | name |
Undocumented |
Class Variable | root_render_func |
Undocumented |
Instance Variable | _module |
Undocumented |
Property | debug_info |
The debug info mapping. |
Property | is_up_to_date |
If this variable is False there is a newer version available. |
Property | module |
The template as module. This is used for imports in the template runtime but is also useful if one wants to access exported template variables from the Python layer: |
jinja2.environment.Template.render
ast.literal_eval
, the parsed value is returned.
Otherwise, the string is returned.Parameters | |
*args:t.Any | Undocumented |
**kwargs:t.Any | Undocumented |
Returns | |
t.Any | Undocumented |
jinja2.environment.Template.render_async
This works similar to render
but returns a coroutine
that when awaited returns the entire rendered template string. This
requires the async feature to be enabled.
Example usage:
await template.render_async(knights='that say nih; asynchronously')
Parameters | |
*args:t.Any | Undocumented |
**kwargs:t.Any | Undocumented |
Returns | |
t.Any | Undocumented |