dddp/accounts/ddp.py
def forgot_password(self, params):
        """Request password reset email."""
        username = self.get_username(params)
        try:
            user = self.user_model.objects.get(**{
                self.user_model.USERNAME_FIELD: username,
            })
        except self.user_model.DoesNotExist:
            self.auth_failed()

        minutes_valid = HASH_MINUTES_VALID[HashPurpose.PASSWORD_RESET]
        token = get_user_token(
            user=user, purpose=HashPurpose.PASSWORD_RESET,
            minutes_valid=minutes_valid,
        )

        forgot_password.send(
            sender=__name__,
            user=user,
            token=token,
            request=this.request,
            expiry_date=calc_expiry_time(minutes_valid),
        )
def forgot_password(self, params):
        """Request password reset email."""
        username = self.get_username(params)
        try:
            user = self.user_model.objects.get(**{
                self.user_model.USERNAME_FIELD: username,
            })
        except self.user_model.DoesNotExist:
            self.auth_failed()

        minutes_valid = HASH_MINUTES_VALID[HashPurpose.PASSWORD_RESET]
        token = get_user_token(
            user=user, purpose=HashPurpose.PASSWORD_RESET,
            minutes_valid=minutes_valid,
        )

        forgot_password.send(
            sender=__name__,
            user=user,
            token=token,
            request=this.request,
            expiry_date=calc_expiry_time(minutes_valid),
        )
Request password reset email.