def data_type_matched(self, datum):
        if datum:
            action_data_types = getattr(self, "allowed_data_types", [])
            # If the data types of this action is empty, we assume it accepts
            # all kinds of data and this method will return True.
            if action_data_types:
                datum_type = getattr(datum, self.table._meta.data_type_name,
                                     None)
                if datum_type and (datum_type not in action_data_types):
                    return False
        return True
Generate a sender for a new form
dataset/ETHPy150Open openstack/horizon/horizon/tables/actions.py/BaseAction.data_type_matched--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/cap.py/S3CAPModel.generate_sender