title: Jinja Templates - Format a float as comma-separated currency
body: <p>I'm trying to format a float as comma-separated currency.  E.g. <code>543921.9354</code> becomes <code>$543,921.94</code>.  I'm using the <code>format</code> filter in Jinja templates, which seems to mimic the <code>%</code> operator in Python rather than the Python <code>format</code> function?</p>
  
  <p>How can I accomplish this formatting in Jinja?  Is it possible using the <code>format</code> filter?  This is what I have so far, which accomplishes everything except the commas:</p>
  
  <p><code>"$%.2f"|format(543921.9354)</code></p>
  
  <p>which of course yields</p>
  
  <p><code>$543921.94</code></p>