Reverse related object descriptor is overwritten on class
This line overwrites the parent model class reverse related field object descriptor with a property function (at model instantiation), which breaks references to the field and its attributes for other interfaces. See this issue which arose in the implementation of a model relation introspection app on a model hierarchy using django-polymorphic
I guess its this line now: https://github.com/chrisglass/django_polymorphic/blob/master/polymorphic/polymorphic_model.py#L180
Any reason why you chose to do this? Any interest in finding a way around it (maybe metaclasses like Django itself uses)?
Hi! thanks for dropping a line.
This code makes sure that the .._ptr fields don't use a PolymorphicManager to access the base objects. Otherwise, you'd never be able to access it; the PolymorphicManager would immediately downcast the retrieved model back to the Child model.
If there is a better way (I guess a descriptor), that would be welcome to have! This fix should indeed happen in the metaclass, I find it a bit strange to see this code in the model class.