芹菜与芹菜

2024-10-01 13:39:56 发布

您现在位置:Python中文网/ 问答频道 /正文

当我试图在我的django项目上设置celery时,我对这两个应用程序之间的差异感到困惑。在

两者之间有什么区别吗?当我在网上阅读教程时,我看到它们都在使用,我不确定哪一个最适合我。看起来,djaceley有点像芹菜,但是为django量身定做的?但芹菜不需要包含在内置应用程序中,而djceleri则需要。在

谢谢你


Tags: 项目django应用程序教程差异内置celery芹菜
2条回答

Django celery是一个为Django提供celery集成的项目,但现在不再需要它了。在

你不必再安装django芹菜了。因为3.1django是开箱即用的。在

因此,要安装芹菜,可以使用pip:

pip install -U Celery

这是来自Celery First Steps with Django Tutorial的注释

Note:

Previous versions of Celery required a separate library to work with Django, but since 3.1 this is no longer the case. Django is supported out of the box now so this document only contains a basic way to integrate Celery and Django. You will use the same API as non-Django users so it’s recommended that you read the First Steps with Celery tutorial first and come back to this tutorial. When you have a working example you can continue to the Next Steps guide.

使用Django时,应该从PyPI安装django-celery。芹菜将作为依赖项安装。在

djceleri将您的django项目与celeri挂钩,这是一种用于各种应用程序堆栈的更通用的工具。在

Here是Celery的Django入门指南,它描述了安装Django Celery和设置您的第一个任务。在

相关问题 更多 >