title: how to get results of query in another query in django
body: <p>I have the following models:</p>
  
  <pre><code>class Activity(models.Model):
      name = models.CharField(max_length=128)
      def __unicode__(self):
          return self.name
  
  class CustomerActivity(models.Model):
      customer = models.ForeignKey(Customer)
      activity = models.ForeignKey(Activity)
      def __unicode__(self):
          return self.activity.name
  </code></pre>
  
  <p>I have a filter that gets all the CustomerActivities for a customer:</p>
  
  <pre><code>customer_activities = CustomerActivity.objects.filter(customer=customer)
  </code></pre>
  
  <p>What I really need is all the Activity objects based on the results of the customer_activities?</p>
  
  <p>Something like</p>
  
  <pre><code>   activities = Activity.objects.filter(activity_in=customer_activities)???
  </code></pre>