title: Using Generic Foreign Keys to retrieve data
body: <p>I have the class <code>Streams</code> in my model.py which is supposed to have a generic foreign key to another class type (<code>Commentdata</code> or <code>ResponseData</code>)</p>
  
  <p>When I get a Streams row I want to access the data in another class with the same id. For instance, when I create a Stream db entry it will also create a CommentData db entry with the same ID and the row will have a genericforeignkey to <code>CommentData</code>. When I want to access the comment data I will check the related class for that stream and then query the content type for rows where id = Stream.id</p>
  
  <p>This is in my Streams class:</p>
  
  <pre><code>limit = models.Q(app_label='picture', model='commentdata') | models.Q(app_label='picture', model='responsedata')`
  
  content_type = models.ForeignKey(ContentType, verbose_name='Data Type', limit_choices_to=limit, null=True, blank=True)
  
  object_id = models.PositiveIntegerField(verbose_name='Related Object', null=True, blank=True)
  
  content_object = GenericForeignKey('content_type', 'object_id')
  </code></pre>
  
  <p>In django admin I can save<code>Streams</code> content type to the either(<code>Commentdata</code> or <code>ResponseData</code>) which is fine.</p>
  
  <p>If I do something along the lines of </p>
  
  <pre><code>x = Streams.objects.all()
  y = x[0].content_type
  </code></pre>
  
  <p>I can output what class streams related to. I can't then do something like <code>y.objects.all()</code> to get the related class as I get the error </p>
  
  <blockquote>
    <p>Manager isn't accessible via ContentType instances</p>
  </blockquote>
  
  <p>Is there anyway to use the ContentType Manager to find this information?  <code>ContentType.objects.get_for_model(x[0])</code> returns the class <code>Stream</code>. Similarly <code>ContentType.objects.get_for_model(y)</code> returns content type.</p>
  
  <p>Thank you</p>