title: django: Filter objects by multiple key,value pairs of one foreign key model
body: <p>I would like to know which is the best way to filter objects, that have multiple parameter/value pairs of one foreign model.
  Example:</p>
  
  <pre><code>class Car(models.Model):
      name = models.SlugField("Name")
  
  class Parameter(models.Model):
      name  = models.SlugField()
      value = models.TextField(blank=True)
      car   = models.ForeignKey('Car', related_name = 'parameters')
  </code></pre>
  
  <p>Let's say i have some cars that have these 3 specific parameters: (name=color, value=blue); (name=tire, value=Goodyear); (name=seat, value=leather)</p>
  
  <p>What would be the best way to filter all cars that have these certain parameter/value combinations?
  What i have done by now is to filter one parameter/value pair after the other in a loop. But this takes to much time and i'm sure there is a better way. Somehow by aggregations perhaps...?</p>
  
  <p>By now the only way i get it to work, is:</p>
  
  <pre><code> Job.objects.filter( Q(parameters__name="tire", parameters__value="Goodyear") ).filter( Q(parameters__name="color", parameters__value="blue") ).filter( Q(parameters__name="seat", parameters__value="leather") )
  </code></pre>