I’m currently writing a web application with django and now put in a button on my main page that will open a new browser window and run a python script. Now the script takes about 5 min to finish. How can I return a Response before that time, so the user knows something is happening and it just takes some time. Here’s the part of the views.py im using.
Thank you for your help!
def redoScan(request):
main()
return HttpResponse("Submitted new scan job. New data will be displayed on main page in 5 minutes")
Alright, I have actually used Javascript now to write a status on the screen and then I call an AJAX function that will post the new status once the scan is done. That wasn’t actually to bad and since I’m using AJAX anyway not a big deal. Should have thought of that before.
Thank you guys anyways for your help!