Currency format in flask jinja2 with both cents and commas

Viewed 103

I'm trying to express an amount with both cents and commas. I can find the way to do this for the cents, but not both. Here is what I am using for cents.

{{"$%.2f"|format(price)}}

I have tried the following

{{"${:,.2f}"|format(price)}}

But this generates an error

TypeError: not all arguments converted during string formatting
0 Answers
Related