]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/django.wsgi
Fix 404 rendering
[sommitrealweird.git] / 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__), '.')))
-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()