How can I call python method from Jinja2

I will check it and post you later but in general {{ doc }} is available.

Basically when I am free I will try this first: