I am working on a Django based server and i take some attachments from the user and process it in this function
def get_request(request):
df = pd.DataFrame()
flag = 0
# if this is a POST request we need to process the form data
if request.method == 'POST':
#Processing and generating results
return render(request, 'result.html', {'data': to_send, 'file': df, 'flag': flag})
Initially, I wanted to render the results HTML page as above but instead I decided to send an email containing the results and send it to the user. I am able to send the results but I want to render a final page with some text while the results generate(might take some time depending on the size of the input). How can I do so without waiting for the processing to end and let it be in the background even if the user closes the tab?