0

I am building a Django app that has a list of words. The app now tells the user the first word of the list via a speech function. Then the user can record an audio of a word he says. This word gets turned into a string in the front end. Now I want to compare the word from the user with the first string of a second list that has the same amount of characters as the first list. And this whole process should be repeated with all characters of the first list. Can I do this kind of loop in my views.py or would it work better in the frontend in javascript?

2 Answers 2

0

I think yes, you can loop inside your views.py, inside your function make a loop and can compare your words.

Sign up to request clarification or add additional context in comments.

1 Comment

But how should the function in views.py then know when to take the next character in the list
0

I ended up doing it on the frontend in javascript by using an async function, which awaits another function to return a Promise. For more details check out this post.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.