title: django - DecimalField max_digits, decimal_places explained
body: <p>So I'm just starting out with Django and using it to store forex prices which are represented as <code>1.21242</code>, <code>1.20641</code>, etc...</p>
  <p><strong>model.py</strong></p>
  <pre><code>from django.db import models
  
  # Create your models here.
  class ForexPrice(models.Model):
      openPrice = models.DecimalField(max_digits=6, decimal_places=6)
      highPrice = models.DecimalField(max_digits=6, decimal_places=6)
      lowPrice = models.DecimalField(max_digits=6, decimal_places=6)
      closePrice = models.DecimalField(max_digits=6, decimal_places=6)
  </code></pre>
  <p><strong>My Question Is:</strong><br/>
  How do the max_decimal and decimal_places attributes work? I'm using 6 for both fields assuming <code>max_digits=6</code> will allow values to be stored up to 6 digits ie: 123456.000000 while <code>decimal_palces=6</code> will support values up to 000000.123456. <br /><br />Is this assumption correct or am I missing something?</p>
  <p>Getting the following error when I save the record to the DB:<br /></p>
  <blockquote>
  <p>A field with precision 6, scale 6 must round to an absolute value less
  than 1.</p>
  </blockquote>