def delete_translations(sender, instance, **kwargs):
    """
    Deletes related instance's translations when instance is deleted.
    """
    if issubclass(sender, (ModelMixin,)):
        instance._linguist.decider.objects.filter(
            identifier=instance.linguist_identifier, object_id=instance.pk
        ).delete()
def delete_translations ( sender , instance , ** kwargs ) : if issubclass ( sender , ( ModelMixin , ) ) : instance . _linguist . decider . objects . filter ( identifier = instance . linguist_identifier , object_id = instance . pk ) . delete ( )
Deletes related instance's translations when instance is deleted.