title: Determining Django Model Instance Types after a Query on a Base-class
body: <p>Is there a way to determine what the 'real' class of a Django database object is, after it has been returned from a query for on a base class?</p>
  
  <p>For instance, if I have these models...</p>
  
  <pre><code>class Animal(models.Model):
      name= models.CharField(max_length=128)
  
  class Person(Animal):
      pants_size = models.IntegerField(null=True)
  
  class Dog(Animal):
      panting_rate = models.IntegerField(null=True)
  </code></pre>
  
  <p>And create these instances...</p>
  
  <pre><code>Person(name='Dave').save()
  Dog(name='Mr. Rufflesworth').save()
  </code></pre>
  
  <p>If I do a query like <code>Animal.objects.all()</code>, I end up with two <code>Animal</code> instances, not an instance of <code>Person</code> and an instance of <code>Dog</code>. Is there any way to determine which instance is of which type?</p>
  
  <hr>
  
  <p>FYI: I already tried doing this...</p>
  
  <pre><code>isinstance(Animal.objects.get(name='Dave'),Person) # &lt;-- Returns false!
  </code></pre>
  
  <p>But that doesn't seem to work.</p>