polymorphic.utils¶
-
polymorphic.utils.reset_polymorphic_ctype(*models, **filters)¶ Set the polymorphic content-type ID field to the proper model Sort the
*modelsfrom base class to descending class, to make sure the content types are properly assigned.Add
preserve_existing=Trueto skip models which already have a polymorphic content type.