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
I think yes, you can loop inside your views.py, inside your function make a loop and can compare your words.
1 Comment
anonimostilton
But how should the function in views.py then know when to take the next character in the list
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.