Recursivity in dictionnaries doesn't work #2047
-
Hello there :) It works well for lists, but I'm stuck trying to make it works with dictionnaries Here is my template to easily reproduce the bug :
They're is a little Python script to provide a little dict structure :
The execution of the script brings me the following error :
I expect to have a file containing the dict like:
Environment:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Jaja, recursivity with dictionaries works great. The bug is in your example template. You just need to use template1.rst
jinja2_recursive.py
|
Beta Was this translation helpful? Give feedback.
Jaja, recursivity with dictionaries works great. The bug is in your example template.
You just need to use
loop(v.items())
instead ofloop(v)
template1.rst
jinja2_recursive.py