title: Polymorphic behavior in django's Admin
body: <p><strong>The problem</strong></p>
  
  <p>Suppose I have three classes A, B and C, where B is a subclass of A and C is a subclass of B:</p>
  
  <pre><code>A &lt;- B &lt;- C
  </code></pre>
  
  <p>When I open up the admin and list all "A"s, I see all "A"s, "B"s and "C"s. But when I follow one of those links, to see the details and edit that particular B, I will see only the fields of B, even if that instance is actually an instance of C. 
  What I would like to see is the object to be shown to me according to its most specific type.</p>
  
  <p><strong>What I'm trying</strong> </p>
  
  <p>I'm using <a href="https://stackoverflow.com/questions/929029/how-do-i-access-the-child-classes-of-an-object-in-django-without-knowing-the-name/929982#929982">InheritanceManager</a> to get instances casted to the right type when working at a more abstract level. This works almost well (it can't handle more than one inheritance level). However, even for a single inheritance level, I can't get the polymorphic behavior to be reflected in the admin, as obviously the admin doesn't know about the manager's <code>select_subclasses()</code> method. </p>
  
  <p>Any idea on how could I use to get such a polymorphic-like behavior on the admin?</p>
  
  <p><strong>Concrete Example</strong></p>
  
  <p>models.py:</p>
  
  <pre><code>from django.db import models
  from model_utils.managers import InheritanceManager
  
  class A(models.Model):
      a_field = models.CharField(max_length=200)
      objects = InheritanceManager()
  
  class B(A):
      b_field = models.CharField(max_length=200)
  
  class C(B):
      c_field = models.CharField(max_length=200)
  </code></pre>
  
  <p>admin.py</p>
  
  <pre><code>from myapp.models import A, B, C
  from django.contrib import admin
  
  admin.site.register(A)
  admin.site.register(B)
  admin.site.register(C)
  </code></pre>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>Adding a link to two threads from 2010 with some thoughts on how to achieve this with django-polymorphic: </p>
  
  <ul>
  <li><a href="http://groups.google.com/group/django-polymorphic/browse_frm/thread/84290fe76c40c12d" rel="nofollow noreferrer">http://groups.google.com/group/django-polymorphic/browse_frm/thread/84290fe76c40c12d</a></li>
  <li><a href="http://groups.google.com/group/django-polymorphic/browse_frm/thread/8332d9a71daa7fc5" rel="nofollow noreferrer">http://groups.google.com/group/django-polymorphic/browse_frm/thread/8332d9a71daa7fc5</a></li>
  </ul>