Signals

Signals of the secret app.

The Secret model sends secret_created, secret_edited and secret_accessed, whichever code saves or reads it. The SecretTransformer, which applies a Secret’s manifest, sends the others.

smarter.apps.secret.signals.broker_ready = <django.dispatch.dispatcher.Signal object>

Signal sent when a broker achieves a ready state.

Parameters:

broker – The broker instance that is ready.

Example:

# a broker sends it once, from its ready property
self.send_broker_ready(broker_ready)
smarter.apps.secret.signals.secret_accessed = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is accessed.

Parameters:
  • secret (Secret) – The accessed secret instance.

  • user_profile (UserProfile) – The profile of the user who accessed the secret.

Example:

secret_accessed.send(sender=self.__class__, secret=self, user_profile=self.user_profile)
smarter.apps.secret.signals.secret_created = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is created.

Parameters:

secret (Secret) – The newly created secret instance.

Example:

secret_created.send(sender=self.__class__, secret=self)
smarter.apps.secret.signals.secret_deleted = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is deleted.

Parameters:
  • secret_id (int) – The deleted secret’s id.

  • secret_name (str) – The deleted secret’s name.

Example:

secret_deleted.send(sender=self.__class__, secret_id=secret_id, secret_name=secret_name)
smarter.apps.secret.signals.secret_edited = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is edited.

Parameters:

secret (Secret) – The edited secret instance.

Example:

secret_edited.send(sender=self.__class__, secret=self)
smarter.apps.secret.signals.secret_initializing = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is initializing.

Parameters:
  • secret_name (str) – The name of the secret being initialized.

  • user_profile (UserProfile) – The profile of the user associated with the secret.

Example:

secret_initializing.send(sender=self.__class__, secret_name=name, user_profile=user_profile)
smarter.apps.secret.signals.secret_ready = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is ready.

Parameters:

secret (Secret) – The secret instance that is ready.

Example:

secret_ready.send(sender=self.__class__, secret=self)
smarter.apps.secret.signals.secret_saved = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is saved.

Parameters:
  • secret (Secret) – The saved secret instance.

  • user_profile (UserProfile) – The profile of the user who saved the secret.

Example:

secret_saved.send(sender=self.__class__, secret=self, user_profile=self.user_profile)
smarter.apps.secret.signals.secret_updated = <django.dispatch.dispatcher.Signal object>

Signal sent when a secret is updated.

Parameters:
  • secret (Secret) – The updated secret instance.

  • user_profile (UserProfile) – The profile of the user who updated the secret.

Example:

secret_updated.send(sender=self.__class__, secret=self, user_profile=self.user_profile)