Should I use django-gunicorn integration or wsgi?

断了今生、忘了曾经 提交于 2019-12-01 16:23:56

问题


I am setting up a web server with gunicorn + django. There are two deployment options: either use regular WSGI, or use gunicorn's django-integration. I'm tempted to use the latter, because it simplifies configuration, but the django documentation says this:

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.

They give no explanation, so I wonder why it's "highly recommended" to go with WSGI? Any ideas?

Thanks a lot.


回答1:


Starting with Django 1.4, your project will already have a wsgi.py, which can be used with any wsgi server (of which there are many, gunicorn being just one).

Essentially the old Django integration for gunicorn was just a convenience to get you up and running faster, but it's no longer necessary because all Django projects now have wsgi.py



来源:https://stackoverflow.com/questions/15380460/should-i-use-django-gunicorn-integration-or-wsgi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!