def ready(self):
        from nodeconductor.core import handlers
        from nodeconductor.core.models import StateMixin

        User = get_user_model()
        SshPublicKey = self.get_model('SshPublicKey')

        signals.pre_save.connect(
            handlers.preserve_fields_before_update,
            sender=User,
            dispatch_uid='nodeconductor.core.handlers.preserve_fields_before_update',
        )

        signals.post_save.connect(
            handlers.create_auth_token,
            sender=User,
            dispatch_uid='nodeconductor.core.handlers.create_auth_token',
        )

        signals.post_save.connect(
            handlers.log_user_save,
            sender=User,
            dispatch_uid='nodeconductor.core.handlers.log_user_save',
        )

        signals.post_delete.connect(
            handlers.log_user_delete,
            sender=User,
            dispatch_uid='nodeconductor.core.handlers.log_user_delete',
        )

        signals.post_save.connect(
            handlers.log_ssh_key_save,
            sender=SshPublicKey,
            dispatch_uid='nodeconductor.core.handlers.log_ssh_key_save',
        )

        signals.post_delete.connect(
            handlers.log_ssh_key_delete,
            sender=SshPublicKey,
            dispatch_uid='nodeconductor.core.handlers.log_ssh_key_delete',
        )

        for index, model in enumerate(StateMixin.get_all_models()):
            fsm_signals.post_transition.connect(
                handlers.delete_error_message,
                sender=model,
                dispatch_uid='nodeconductor.core.handlers.delete_error_message_%s_%s' % (model.__name__, index),
            )
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/core/apps.py/CoreConfig.ready/original