djangosnippets.org: Latest snippets posted by kljensenhttps://djangosnippets.org/users/kljensen/2008-01-17T19:15:34.060832-06:00kljensenCurrency filter
2008-01-17T19:15:34.060832-06:00kljensenhttps://djangosnippets.org/snippets/552/<p>Formats a number in the local currency format. E.g., if <code>foo</code> is equal to <code>49277</code>, then</p>
<blockquote>
<p><code>{{ foo|currency }}</code></p>
</blockquote>
<p>would print</p>
<blockquote>
<p><code>$49,277</code></p>
</blockquote>
<p>If your locale is the U.S. You can use this filter in your templates as described in the <a href="http://www.djangoproject.com/documentation/templates_python/">Django documentation</a></p>
Freely redistributable