title: How can i convert DecimalField to float in Python Django?
body: <p>I have this form field:</p>
  
  <pre><code>area = forms.DecimalField(max_digits=20)
  </code></pre>
  
  <p>When I post it I get unicode data:</p>
  
  <pre><code>raise Exception(type(a.get('area',))
  </code></pre>
  
  <p>the result is</p>
  
  <blockquote>
    <p><code>&lt;type 'unicode'&gt;</code></p>
  </blockquote>
  
  <p>How can I convert that to float? I want to perform an arithmetic operation on the result.</p>
  
  <p>If I do this:</p>
  
  <pre><code>float(a.get('area', '0'))
  </code></pre>
  
  <p>Then I get this</p>
  
  <blockquote>
    <p>float() argument must be a string or a number</p>
  </blockquote>