How to format a float number in Python Flask and Jinja?
问题 I've Googled and searched here but can't find an explanation I understand. I've got a value which gets passed into the html template with the value 53.0 which is obtained from a 3rd party API. My code is: £{{product_details.UnitPrice}} Which displays £53.0, is there a way of formatting this as a 2 decimal place float so it correctly reads £53.00. I have tried reading some instructions here from the github but I don't understand them. I'm trying to avoid formatting each variable separately in