title: Django models avoid duplicates
body: <p>In models:</p>
  
  <pre><code>class Getdata(models.Model):
      title = models.CharField(max_length=255)
      state = models.CharField(max_length=2, choices=STATE, default="0")
      name = models.ForeignKey(School)
      created_by = models.ForeignKey(profile)
  
      def __unicode__(self):
          return self.id()
  </code></pre>
  
  <p>In templates:</p>
  
  <pre><code>&lt;form&gt;
      &lt;input type="submit" value="save the data" /&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>If the user clicks on the save button and the above data is saved in the table, how to avoid the duplicates, i.e. if the user again clicks on the same submit button there should not be another entry for the same values. Or is it something that has to be handled in views?</p>