var_block Module
Classes
| VarBlock |
Create a variable block. A variable block is used to add a variable to a template. It gets rendered from KernelArguments, if the variable is not found a warning is logged and an empty string is returned. The variable must start with $ and be followed by a valid variable name. A valid variable name is a string of letters, numbers and underscores. Create a new model by parsing and validating input data from keyword arguments. Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. self is explicitly positional-only to allow self as a field name. |