我应该使用django-gunicorn集成还是wsgi?

Min*_*ark 6 django django-wsgi gunicorn

我正在用gunicorn + django设置Web服务器。有两种部署选项:要么使用常规WSGI,要么使用gunicorn的django-integration。我倾向于使用后者,因为它简化了配置,但是django文档说:

If you are using Django 1.4 or newer, it’s highly recommended to simply run your
application with the WSGI interface using the gunicorn command as described above.
Run Code Online (Sandbox Code Playgroud)

他们没有给出任何解释,所以我想知道为什么“强烈推荐”使用WSGI?有任何想法吗?

非常感谢。

And*_*ram 5

从Django 1.4开始,您的项目将已经有一个wsgi.py,可以与任何wsgi服务器一起使用(其中有很多,gunicorn只是其中之一)。

从本质上讲,旧的gunicorn Django集成只是让您更快地启动和运行的一种便利,但是由于所有Django项目现在都具有wsgi.py,因此不再需要