]> git.ozlabs.org Git - patchwork/commitdiff
helpers: Change patchwork.wsgi to include the apps/ dir in sys.path
authorGuilherme Salgado <guilherme.salgado@linaro.org>
Tue, 15 Feb 2011 02:30:54 +0000 (02:30 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 28 Feb 2011 01:54:15 +0000 (09:54 +0800)
Without this, templates will crash as they reference patchwork.<module>
directly.

Also removes the patchwork.wsgi symlink from the root and use the real
file in patchwork.wsgi.conf instead, as suggested by Dirk Wallenstein.

Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/apache2/patchwork.wsgi
lib/apache2/patchwork.wsgi.conf
patchwork.wsgi [deleted symlink]

index 0488b48f39717770e25c60ccdeb3db3544fd03dd..869bb9de6c147e73dadc5ab998905a8ddb2948fb 100644 (file)
@@ -9,8 +9,10 @@
 import os
 import sys
 
-basedir = os.path.dirname(__file__)
+basedir = os.path.join(
+    os.path.dirname(__file__), os.path.pardir, os.path.pardir)
 sys.path.append(basedir)
+sys.path.append(os.path.join(basedir, 'apps'))
 
 os.environ['DJANGO_SETTINGS_MODULE'] = 'apps.settings'
 import django.core.handlers.wsgi
index e99f8c60860c9e7eb62cde7774320091f6414272..3756e5ab2761be25960f53670d3ba0842462c91b 100644 (file)
@@ -16,5 +16,5 @@
         </Directory>
 </IfModule>
 
-WSGIScriptAlias / "/srv/patchwork/patchwork.wsgi"
+WSGIScriptAlias / "/srv/patchwork/lib/apache2/patchwork.wsgi"
 WSGIPassAuthorization On
diff --git a/patchwork.wsgi b/patchwork.wsgi
deleted file mode 120000 (symlink)
index cf13d18..0000000
+++ /dev/null
@@ -1 +0,0 @@
-lib/apache2/patchwork.wsgi
\ No newline at end of file