class NativeEnvironment(Environment):
Inherited from Environment
:
Method | __init__ |
Undocumented |
Method | _compile |
Internal hook that can be overridden to hook a different compile method in. |
Method | _filter_test_common |
Undocumented |
Method | _generate |
Internal hook that can be overridden to hook a different generate method in. |
Method | _load_template |
Undocumented |
Method | _parse |
Internal parsing function used by parse and compile . |
Method | _tokenize |
Called by the parser to do the preprocessing and filtering for all the extensions. Returns a ~jinja2.lexer.TokenStream . |
Method | add_extension |
Adds an extension after the environment was created. |
Method | call_filter |
Invoke a filter on a value the same way the compiler does. |
Method | call_test |
Invoke a test on a value the same way the compiler does. |
Method | compile |
No summary |
Method | compile_expression |
A handy helper method that returns a callable that accepts keyword arguments that appear as variables in the expression. If called it returns the result of the expression. |
Method | compile_templates |
No summary |
Method | extend |
Add the items to the instance of the environment if they do not exist yet. This is used by :ref:`extensions <writing-extensions>` to register callbacks and configuration values without breaking inheritance. |
Method | from_string |
Load a template from a source string without using loader . |
Method | get_or_select_template |
Use select_template if an iterable of template names is given, or get_template if one name is given. |
Method | get_template |
Load a template by name with loader and return a Template . If the template does not exist a TemplateNotFound exception is raised. |
Method | getattr |
Get an item or attribute of an object but prefer the attribute. Unlike getitem the attribute must be a string. |
Method | getitem |
Get an item or attribute of an object but prefer the item. |
Method | handle_exception |
Exception handling helper. This is used internally to either raise rewritten exceptions or return a rendered traceback for the template. |
Method | iter_extensions |
Iterates over the extensions by priority. |
Method | join_path |
No summary |
Method | lex |
No summary |
Method | list_templates |
Returns a list of templates for this environment. This requires that the loader supports the loader's ~BaseLoader.list_templates method. |
Method | make_globals |
Make the globals map for a template. Any given template globals overlay the environment globals . |
Method | overlay |
No summary |
Method | parse |
No summary |
Method | preprocess |
Preprocesses the source with all extensions. This is automatically called for all parsing and compiling methods but not for lex because there you usually only want the actual source tokenized. |
Method | select_template |
Like get_template , but tries loading multiple names. If none of the names can be loaded a TemplatesNotFound exception is raised. |
Class Variable | linked_to |
Undocumented |
Class Variable | overlayed |
Undocumented |
Class Variable | sandboxed |
Undocumented |
Class Variable | shared |
Undocumented |
Class Variable | template_class |
Undocumented |
Instance Variable | auto_reload |
Undocumented |
Instance Variable | autoescape |
Undocumented |
Instance Variable | block_end_string |
Undocumented |
Instance Variable | block_start_string |
Undocumented |
Instance Variable | bytecode_cache |
Undocumented |
Instance Variable | cache |
Undocumented |
Instance Variable | comment_end_string |
Undocumented |
Instance Variable | comment_start_string |
Undocumented |
Instance Variable | extensions |
Undocumented |
Instance Variable | filters |
Undocumented |
Instance Variable | finalize |
Undocumented |
Instance Variable | globals |
Undocumented |
Instance Variable | is_async |
Undocumented |
Instance Variable | keep_trailing_newline |
Undocumented |
Instance Variable | line_comment_prefix |
Undocumented |
Instance Variable | line_statement_prefix |
Undocumented |
Instance Variable | loader |
Undocumented |
Instance Variable | lstrip_blocks |
Undocumented |
Instance Variable | newline_sequence |
Undocumented |
Instance Variable | optimized |
Undocumented |
Instance Variable | policies |
Undocumented |
Instance Variable | tests |
Undocumented |
Instance Variable | trim_blocks |
Undocumented |
Instance Variable | undefined |
Undocumented |
Instance Variable | variable_end_string |
Undocumented |
Instance Variable | variable_start_string |
Undocumented |
Property | lexer |
The lexer for this environment. |