Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

230
Views
Postman trabaja en datos de formulario pero no en bruto o en mi servidor para el caso

Entonces, la primera pieza de código es el punto final del back-end y la segunda es el front-end. No envía el token a una dirección de correo electrónico en el servidor ni utiliza datos sin procesar de Postman. Pero envía un token usando datos de formulario. Alguna idea soy nuevo en esto. Gracias

 class RegisterView(View): def post(self, request, *args, **kwargs): data = request.POST.get('email') check_if_email_exists = [] for email in Registration.objects.all().values_list('email', flat=True): check_if_email_exists.append(email) if data in check_if_email_exists: return JsonResponse('Email already provided', safe=False, status=200) else: new_user = Registration.objects.create(email=data) new_user.save() content = {'code': new_user.code} send_mail( "Thanks for Registering", f'Here is your signup Token:{content}', 'djangod192@gmail.com', [data], fail_silently=False, ) return JsonResponse(content, status=201)
 const SignUpStep1 = () => { const navigate = useNavigate(); const [email,setEmail] = useState(""); const dispatch = useDispatch(); const url = "https://motion.propulsion-learn.ch/app/api/auth/registration/"; const updateEmail = (event) => { setEmail(event.target.value); } const sendVerificationCode = (event) => { event.preventDefault(); if (email.length > 0) { const data = { email: email }; const fetchConfig = { method: 'POST', headers: new Headers({ "Content-Type": "application/json", }), body: JSON.stringify(data), }; fetch(url,fetchConfig) .then((response) => { return response.json(); }) const action = { type:"setEmail", payload:email }; dispatch(action) navigate("/SignUpStep2") }else{ alert("please enter email address"); } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!