mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-25 07:40:24 +00:00
By itself, .instance_of(*models) will actually call select_subclasses(*models), which results in just those objects being cast to subclasses. However, if you want the casting to grandchildren (which is supported only in django 1.6+), then you may use an extra call to .select_subclasses() (without arguments, to select all subclasses). It doesn't deal with @kezabelle's discussion of mixed-use of select_subclasses/ instance_of, I still need to look at that. But it does pass all current tests... |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| fields.py | ||
| models.py | ||
| tests.py | ||