]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Fix the WSGI
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 24 May 2015 18:18:45 +0000 (19:18 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 24 May 2015 18:18:45 +0000 (19:18 +0100)
sommitrealweird/django.wsgi

index 3fa519129b4765dfa5b80baf2b11b3e7d7b3b23f..da8644a40ec102601410aae85efe69111a4a65ba 100644 (file)
@@ -1,9 +1,8 @@
 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__), '.')))
 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()