code: def activate_view(self, request, user_id, token):
          
          try:
              user = self.user_model.objects.get(id=user_id, is_active=False)
          except self.user_model.DoesNotExist:
              raise Http404(_("Your URL may have expired."))
  
          if not RegistrationTokenGenerator().check_token(user, token):
              raise Http404(_("Your URL may have expired."))
          form = self.get_form(
              data=request.POST or None, files=request.FILES or None, instance=user
          )
          if form.is_valid():
              form.instance.is_active = True
              user = form.save()
              user.set_password(form.cleaned_data["password"])
              user.save()
              self.activate_organizations(user)
              user = authenticate(
                  username=form.cleaned_data["username"],
                  password=form.cleaned_data["password"],
              )
              login(request, user)
              return redirect(self.get_success_url())
          return render(request, self.registration_form_template, {"form": form})
docs: View function that activates the given User by setting `is_active` to
          true if the provided information is verified.