下面是我如何使用gevent+monkey补丁运行Django:
manage.pyfrom gevent import monkey; monkey.patch_all()run_production_server
1234run_production_server
from gevent import monkey; monkey.patch_all()
from gevent.wsgi import WSGIServer
from django.core.management import setup_environ
import settings
setup_environ(settings)
from django.core.handlers.wsgi import WSGIHandler as DjangoWSGIApp
application = DjangoWSGIApp()
server = WSGIServer(("127.0.0.1", 1234), application)
print "Starting server on http://127.0.0.1:1234"
server.serve_forever()
gunicornuwsgi