import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '.')))
-sys.path.append('/usr/local/django')
-os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
-import django.core.handlers.wsgi
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()
-application = django.core.handlers.wsgi.WSGIHandler()