def save(self, commit=True): participant = super(RegisterForm, self).save(commit=False) participant.set_password(self.cleaned_data["password1"]) participant.is_active = not settings.SUBSCRIPTION_NEEDS_ACTIVATION if commit: participant.save() if not participant.is_active: send_newsletter(settings.ACTIVATION_NEWSLETTER, participant) return participant
def save(self): """ Generates a one-use only link for resetting password and sends to the user """ for user in self.users_cache: send_newsletter(settings.LOST_PASSWORD_NEWSLETTER,user)