Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
flask show while calculating
#1
hello,

i am wondering if flask has the ability to render the template already halfway trough the calculation
following is example code

@app.route('/')
def my_form():

    return render_template("interface.html")



@app.route('/', methods=['POST'])
def my_form_post():

    time.sleep(5)
    result = "1"
    render_template("interface.html", result=result)
    time.sleep(5)
    result = "2"
    render_template("interface.html", result=result)
    time.sleep(5)
    result = "3"
    return render_template("interface.html", result=result)
i cannot find online how to make this happen
thanks for any help
Reply


Messages In This Thread
flask show while calculating - by keuninkske - Jan-20-2020, 10:09 PM
RE: flask show while calculating - by keuninkske - Apr-05-2020, 01:42 PM
RE: flask show while calculating - by ndc85430 - Apr-05-2020, 01:59 PM
RE: flask show while calculating - by snippsat - Apr-05-2020, 03:46 PM
RE: flask show while calculating - by keuninkske - Apr-05-2020, 05:56 PM
RE: flask show while calculating - by snippsat - Apr-05-2020, 06:30 PM
RE: flask show while calculating - by keuninkske - May-26-2020, 09:14 PM
RE: flask show while calculating - by ndc85430 - May-27-2020, 04:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  show csv file in flask template.html rr28rizal 8 34,853 Apr-12-2021, 09:24 AM
Last Post: adamabusamra

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020