Class | ChainableUndefined |
An undefined that is chainable, where both __getattr__ and __getitem__ return itself rather than raising an UndefinedError . |
Class | Context |
No summary |
Class | DebugUndefined |
An undefined that returns the debug info when printed. |
Class | StrictUndefined |
An undefined that barks on print and iteration as well as boolean tests and all kinds of comparisons. In other words: you can do nothing with it except checking if it's defined using the defined test. |
Class | Undefined |
The default undefined type. This undefined type can be printed and iterated over, but every other access will raise an UndefinedError : |
Constant | F |
Undocumented |
Constant | V |
Undocumented |
Variable | async_exported |
Undocumented |
Variable | exported |
Undocumented |
Class | AsyncLoopContext |
Undocumented |
Class | BlockReference |
One block on a template reference. |
Class | LoopContext |
A wrapper iterable for dynamic for loops, with information about the loop and iteration. |
Class | LoopRenderFunc |
Undocumented |
Class | Macro |
Wraps a macro function. |
Class | TemplateReference |
The self in templates. |
Function | _dict_method_all |
Undocumented |
Function | identity |
Returns its argument. Useful for certain things in the environment. |
Function | make_logging_undefined |
Given a logger object this returns a new undefined class that will log certain failures. It will log iterations and printing. If no logger is given a default logger is created. |
Function | markup_join |
Concatenation that escapes if necessary and converts to string. |
Function | new_context |
Internal helper for context creation. |
Function | str_join |
Simple args to string conversion and concatenation. |
Function | unicode_join |
Undocumented |
Given a logger object this returns a new undefined class that will log certain failures. It will log iterations and printing. If no logger is given a default logger is created.
Example:
logger = logging.getLogger(__name__) LoggingUndefined = make_logging_undefined( logger=logger, base=Undefined )
Parameters | |
logger:t.Optional[ | the logger to use. If not provided, a default logger is created. |
base:t.Type[ | the base class to add logging functionality to. This
defaults to Undefined . |
Returns | |
t.Type[ | Undocumented |
Parameters | |
seq:t.Iterable[ | Undocumented |
Returns | |
str | Undocumented |
Parameters | |
environment:Environment | Undocumented |
template_name:t.Optional[ | Undocumented |
blocks:t.Dict[ | Undocumented |
vars:t.Optional[ | Undocumented |
shared:bool | Undocumented |
globals:t.Optional[ | Undocumented |
locals:t.Optional[ | Undocumented |
Returns | |
Context | Undocumented |