问题
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