title: Custom query filter in django admin
body: <p>Here is my models code:</p>
  
  <pre><code>class Quote(models.Model):
      """Quote model."""
      quote_text = models.TextField(unique=True)
      author = models.ForeignKey(Author)
      topic = models.ForeignKey(Topic)
      tags = models.ManyToManyField(Tag)
      language = models.ForeignKey(Language)
      hit = models.IntegerField(default=0)
      published = models.BooleanField(default=False)
      created = models.DateTimeField(auto_now_add=True)
      modified = models.DateTimeField(auto_now=True)
  </code></pre>
  
  <p>I want filter all Quote based on characters length, and this is my query in django admin.</p>
  
  <pre><code>class QuoteCountFilter(admin.SimpleListFilter):
      """Filter based on quote_text characters count."""
      title = _('Quote Text Char Count')
      parameter_name = 'quotelength'
  
      def lookups(self, request, model_admin):
          return (
              ('lessthan50', _('Less than 50')),
              ('morethan50', _('More than 50')),
          )
  
      def queryset(self, request, queryset):
          if self.value() == 'lessthan50':
              return queryset.extra(select={"val": "SELECT id FROM web_quote WHERE character_length(quote_text) &lt; 50"})
  </code></pre>
  
  <p>However, it returns <strong>Programming error more than one row returned by a subquery used as an expression</strong></p>
  
  <p>Any ideas how to fix?</p>
  
  <p>What I am trying is to find all <code>Quote</code>s where <code>quote_text</code> length is less than 50 characters</p>