title: Problems trying to format currency with Python (Django)
body: <p>I have the following code in Django:</p>
  
  <pre><code>import locale 
  locale.setlocale( locale.LC_ALL, '' )
  
  def format_currency(i):
      return locale.currency(float(i), grouping=True)
  </code></pre>
  
  <p>It work on some computers in dev mode, but as soon as I try to deploy it on production I get this error:</p>
  
  <pre><code>Exception Type: TemplateSyntaxError
  Exception Value: Caught ValueError while rendering: Currency formatting is not possible using the 'C' locale.
  Exception Location: /usr/lib/python2.6/locale.py in currency, line 240
  </code></pre>
  
  <p>The weird thing is that I can do this on the production server and it will work without any errors:</p>
  
  <pre><code>python manage.py shell
  &gt;&gt;&gt; import locale 
  &gt;&gt;&gt; locale.setlocale( locale.LC_ALL, '' )
  'en_CA.UTF-8'
  &gt;&gt;&gt; locale.currency(1, grouping=True)
  '$1.00'
  </code></pre>
  
  <p>I .. don't get it.i</p>