title: Django Advanced Filtering
body: <p>Can I filter a queryset based on a model field's choices?</p>
  
  <p>model:</p>
  
  <pre><code>COLORS = (
      ('BLACK', 'black'),
      ('RED', 'red'),
      ('BLUE', 'blue'),
      //etc..
  )
  
  class Thing(Models.model):
      color = models.CharField(max_length=5, choices=COLORS)
  </code></pre>
  
  <p>view:</p>
  
  <pre><code>def filter_by_color(request):
      q = Thing.objects.filter(???) 
  </code></pre>
  
  <p>Is there a way to filter <code>Thing</code> based on different color choices? Also, is there a way to write this dynamically, so that all color choices can respond to a single view?</p>