def recursive_render(tpl, values):
    prev = tpl
while True:
    curr = jinja2.Template(prev).render(**values)
if curr != prev:
    prev = curr
else:
    return curr
Jinja nested rendering on variable content