'Helper method to reset a password'

def _update_password(self, email, new_password):

    user = User.objects.get(email=email)
    user.set_password(new_password)
    user.save()
    history = PasswordHistory()
    history.create(user)
