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

135
Views
Unknown view function

I have a form that should redirect to another view function called content to predict. I receive an error saying that the form doesn't exist when it does as shown in my code:

def content_to_predict(request):
    if request.method == "POST":
        form = InputForm(request.POST)
        if form.is_valid():
            return redirect('content_to_predict')
    else:
        form = InputForm()
    return render(request, 'prediction/content_input.html', {'form': form})

def show_prediction_result(request):
    return HttpResponse('hello')

What's the problem?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Figured it out. Instead of using redirect, just make a call to another function itself by:

return show_prediction_result(request)

I can't say one way or another as to why redirect doesn't work. If anyone has any input in regards to that. I'd appreciate it.

over 4 years ago · Santiago Trujillo Report
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!