2👍
you can follow this link to do the process using celery tasks
Django export function and Celery task
or you can follow this link to do it using async view in django
https://thoslin.github.io/async-download-with-celery/
both are working great in those situations
Source:stackexchange.com