Django 的多线程

Multithreading for Django

我正在编写 Web 应用程序以使用 Django 从数据库 (MySQL) 获取数据到 file.csv Framework.I 可以获取数据但是需要很长时间才能完成 successfully.I 不想等待获取数据完成。我想继续下一个 activity 但后台仍然从数据库中获取数据。

我的设置:Python 3.6.5,Django 2.1

谢谢你帮助我。

Celery is a python package that will help you perform asynchronous tasks in Django. You can refer to First Steps With Celery for getting started. Also, I have covered a few setup issues and their solution in this post