I have a global function test
from jinja2.utils import contextfunction
@contextfunction
def test(context):
context.get_all()
And in my test I'm calling it like this...
{% set i = 0 %}
{% for j in range(0, 10) %}
{% set k = 0 %}
{{ test() }}
{% endfor %}
The only variable that end up in the context
in test
is i
. j
and k
are "unreadable". Is there any way to access them other than passing them into test(j, k)