wsgi.py
authorPatrick Hetu <patrick.hetu@auf.org>
Fri, 14 Aug 2015 17:30:30 +0000 (13:30 -0400)
committerPatrick Hetu <patrick.hetu@auf.org>
Fri, 14 Aug 2015 17:30:30 +0000 (13:30 -0400)
wsgi.py [new file with mode: 0755]

diff --git a/wsgi.py b/wsgi.py
new file mode 100755 (executable)
index 0000000..317769f
--- /dev/null
+++ b/wsgi.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+import os
+import sys
+
+SITE_ROOT = os.path.dirname(__file__)
+
+# Pour le dev en local
+sys.path.append(os.path.join(SITE_ROOT, '../auf-django-sdk/sdk/django16_auf/'))
+sys.path.append(os.path.join(SITE_ROOT, '../auf-django-sdk/sdk/django16_base/'))
+sys.path.append(os.path.join(SITE_ROOT, '../auf-django-sdk/sdk/django16_dev/'))
+
+# Pour la production
+sys.path.append('/var/lib/auf-django-sdk/django16_auf/')
+sys.path.append('/var/lib/auf-django-sdk/django16_base/')
+sys.path.append('/var/lib/auf-django-sdk/django16_dev/')
+
+sys.path.append(SITE_ROOT)
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()
+