I want to display the cost of the share in Quote tab using the "usd" function defined in helpers.py. I've tried adding app.jinja_env.globals.update(usd=usd)in application.py and then calling the function in quoted.html as {{ usd(rows.price) }} where rows is the dictionary returned by the lookup function. Please suggest a way to do so.

Update: It worked. Had another small bug. Adding the global env part solves the problem.

  • Thank you this really helped me. – dumbitdownjr Jul 3 '17 at 21:56
  • Thanks it helped me so much . – Ami la Rose Jan 29 '19 at 18:39

You must log in to answer this question.

Browse other questions tagged .