title: How can I remove duplicate objects in an order_by query?
body: <pre><code>&gt;&gt;&gt; a = group.objects.order_by('groupname')
  &gt;&gt;&gt; print a
  [&lt;group: beginner 593785332&gt;, &lt;group: beginner 903647323&gt;, &lt;group: blbrz 229225098&gt;]
  </code></pre>
  
  <p>I don't want to have objects with similar <code>goupname</code>, I want to have distinct <code>groupname</code> for each object:</p>
  
  <pre><code>[&lt;group: beginner 593785332&gt;,  &lt;group: blbrz 229225098&gt;]
  </code></pre>
  
  <p>What can I do?</p>
  
  <pre><code>from django.db import models
  class accounts(models.Model):
      twitterid = models.IntegerField()
      credit    = models.IntegerField()
      activate  = models.TextField()
      ban       = models.TextField(blank=True)
      others    = models.TextField()
      def __unicode__(self):
          return u'%s' % (self.twitterid)
      class Meta:
          ordering = ['twitterid']
  
  class group(models.Model):
      groupname        =  models.TextField()
      accounts=models.ForeignKey(accounts)
      def __unicode__(self):
          return u'%s %s' % (self.groupname, self.accounts)
  </code></pre>