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")