Is it possible to update my flask app UI's render template in a while loop?
I have already tried multiple times to return the render_template within my while loop to update the web ui every time the while loop runs.
@app.route('/test_try')
def test_try:
list = []
count = 0
list_count = 10
while count < list_count:
list.append('new_count'+str(count))
count += 1
return render_template('test_try.html', list=list)
I would like my web ui (test_try.html) to update with every count += 1 that runs through the while loop. For example, right now it updates the 10 runs, but all at the some time. I would like to incrementally update each run until the count reaches 10.
I have tried to render_template within the while loop, but that doesn't seem to work either.