title: How to catch all exception in database after save() in django?
body: <p>I want to return these error messages to the html form and show where are wrong with this form.Is there a solution?Or maybe I should use raw SQL queries?Thanks for any advice.</p>
  
  <p>For example:</p>
  
  <p>models.py:</p>
  
  <pre><code>class GeneticCharacter(models.Model):
      StrainNo=models.CharField(max_length=10,primary_key=True)
      StrainName=models.CharField(max_length=10)
      SourceNo=models.IntegerField()
      ESBL=models.CharField(max_length=9,blank=True)
      AEM=models.CharField(max_length=12,blank=True)
      PMQR=models.CharField(max_length=15,blank=True)
      ISeq=models.CharField(max_length=12,blank=True)
      Replicon=models.CharField(max_length=10,blank=True)
      MLST_type=models.CharField(max_length=10,blank=True)
      PLG_type=models.CharField(max_length=2,blank=True)
      IsPat=models.BooleanField()
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>...
  obj=GeneticCharacter()
  obj.ESBL="a"*20
  obj.AEM="a"*20
  obj.save()
  ...
  </code></pre>
  
  <p>How can I catch all the exceptions?</p>