Hi all,
I want to call python function from jinja2.
Is there a way that we can call python function in jinja2 ?
Hi all,
I want to call python function from jinja2.
Is there a way that we can call python function in jinja2 ?
What you mean ? From where ? like from a doctype method? a whitelisted method ?
Generally and not related to current frappe structure, Yes you can with app.jinja_env.globals.update(your_function=your_function
. You have to update context_processor to be available .
I will check it and post you later but in general {{ doc }} is available.
Basically when I am free I will try this first: