def pre_save_email_activation(sender, instance, *args, **kwargs): if not instance.activated and not instance.forced_expired: if not instance.key: instance.key = unique_key_generator(instance)
def pre_save_key_receiver(instance, sender, *args, **kwargs): if not instance.activated and not instance.forced_expired: if not instance.key: instance.key = unique_key_generator(instance)