+ def save(self, force_insert=False, force_update=False):
+ if not hasattr(self, 'instance_type_ptr'):
+ self.instance_type = ContentType.objects.get_for_model(self.__class__)
+ super(InheritableTreeEntity, self).save(force_insert, force_update)
+
+ @property
+ def instance(self):
+ return self.instance_type.get_object_for_this_type(id=self.id)
+