Pass a function in Jinja Template


I want to make a function in jinja template but I am not able to do so.

Please guide me on how to make a function, pass arguments and print the result in jinja templating.


As a templating language, Jinja defines macros rather than functions:

You can use assignment to pass argument and capture the result from a function (this function is in a py file),e.g frappe.get_doc and pass it to the template variable.