from django.contrib.contenttypes.models import ContentType class Contact(models.Model): content_type = models.ForeignKey(ContentType,editable=False,null=True) def save(self): if(not self.content_type): self.content_type = ContentType.objects.get_for_model(self.__class__) self.save_base() def as_leaf_class(self): content_type = self.content_type model = content_type.model_class() if(model == Contact): return self return model.objects.get(id=self.id)