I am trying to use the Jinja2 sandbox to process templates.
I tried to use both DictLoader and FunctionLoader, but I continue to encounter similar problems ... I mainly deal with FunctionLoader.
I am unable to execute includeor importanother template (which contains macros). The FloadLoader function specified by "load" is never called for reference templates.
I tried with no luck:
- just expecting the import to go to the loader using the basic syntax of "import" and "include"
- passing the bootloader into context, seeing if it can pull in this way
- passing a pattern into the template, also hoping that it can draw
- a few more things, all of which I forgot
I am sure there must be a way to support this - can someone point me in the right direction?
source
share