title: Django unique=True except for blank values
body: <p>I have this model:</p>
  
  <pre><code>class Part(models.Model):
      serial_number = models.CharField(max_length=15, null=True, blank=True, validators=[validate_serial], unique=True)
      ....
  </code></pre>
  
  <p>serial_number can be blank and null because all parts don't necessarily have a serial number.  However, after storing one part without a serial number, blank is no longer unique and I get this error:</p>
  
  <p><em>Part with this Serial number already exists.</em></p>
  
  <p>Is there a workaround for this?  I already looked at <a href="https://stackoverflow.com/q/7742845/937147">this question</a>, but I don't have a modelform.  I either use the admin or do it directly in the code.</p>