Ritu Singh
Problem:
The flow of my app is as follows: A file is submitted on the transcribe.html page first which then redirects to the transcibe-complete.html page where the user can click to begin transcription.
Why is the 'transcribeSubmit' view being called instead of the 'initiate_transcription' view when the user clicks the 'click to transcribe' button on the 'initiate_transcription' page?
Each page has their own JS file to ensure that forms are submitted separately.
HTML: (transcribe.html):
(transcribe-complete):
JS:
views.py:
transcribe/urls.py:
mysite/urls.py:
Solution:
The problem is in your url patterns. You are matching two empty paths to two different views. Django will simply match the first path, and call its view. You need to give each one a different path name.
Suggested blogs:
>Step by Step guide to Deploy Terraform in Azure using GitHub Actions
>Testing react components using Hooks and Mocks
>Use Firebase Realtime Database with ASP.NET MVC App
>Use of Singletons in .NET Core in AWS Lambda
>What are common syntax errors and exceptions in Python
>What is data binding in Angular?