jazzband / django-polymorphic

Improved Django model inheritance with automatic downcasting
https://django-polymorphic.readthedocs.io
Other
1.61k stars 275 forks source link

going from base class instance to derived class instance? #129

Open pcompassion opened 9 years ago

pcompassion commented 9 years ago

The documentation illustrates how you can work with model's manager class to get derived class results.

How about individual model instance?
Does django_polymorphic offer a way to get to a derived model instance from a base model instance?

vdboor commented 9 years ago

Yes, there is a get_real_instance() method available.

Clearly, this needs to be emphesized in the docs. If you know a good place for it, please provide us a pull request!