How to get data from api and load site at same time

I am making a website in Django that gets all stock data for the previous day from API. My problem is that when we take that data we run a few calculations and save data in DB (that process takes about 4 hours to finish) in that time I can't load my home page because that's where part of getting, calculating, and saving data is. So basically is there any way to do all things that I mentioned and use the site normally while getting, calculating, and saving data is running in the background?

Back to Top