title: Get all related many-to-many objects from a Django QuerySet
body: <p>I have a twisty maze of interrelated Django models, with many-to-many fields describing the relationships.</p>
  
  <p>What's the cleanest way to get a list of unique members of a related model from a QuerySet?</p>
  
  <p>If I have a Item model with a groups ManyToMany pointing to the Groups model.</p>
  
  <p>If I have a queryset of Items, of 'items', how do I get this:</p>
  
  <pre><code>groups = items[0].groups.all().values_list('name', flat=True)
  </code></pre>
  
  <p>But for the whole set?  Do I need to iterate through them all and do set().intersect() ?</p>