diff options
author | Prabhu Ramachandran | 2011-11-14 16:46:55 +0530 |
---|---|---|
committer | Prabhu Ramachandran | 2011-11-14 16:46:55 +0530 |
commit | a12d6bd09e6a87b266686bd3045c78333f61ec7c (patch) | |
tree | ef4f6a2dac28331ec50fef4be1713e128676387d | |
parent | 67e1fa3bc43792028f78161e2c9d04ae97d1ac56 (diff) | |
download | online_test-a12d6bd09e6a87b266686bd3045c78333f61ec7c.tar.gz online_test-a12d6bd09e6a87b266686bd3045c78333f61ec7c.tar.bz2 online_test-a12d6bd09e6a87b266686bd3045c78333f61ec7c.zip |
This version works with Apache.
-rw-r--r-- | apache/django.wsgi | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apache/django.wsgi b/apache/django.wsgi index ec6a31f..ef88526 100644 --- a/apache/django.wsgi +++ b/apache/django.wsgi @@ -3,11 +3,16 @@ from os.path import dirname, abspath import sys # This file is inside online_test/apache/django.wsgi -MY_DIR = abspath(dirname(dirname(dirname(__file__)))) -if MY_DIR not in sys.path: - sys.path.append(MY_DIR) +# pth should be online_test +pth = abspath(dirname(dirname(__file__))) +if pth not in sys.path: + sys.path.append(pth) +# Now add the parent of online_test also. +pth = dirname(pth) +if pth not in sys.path: + sys.path.append(pth) os.environ['DJANGO_SETTINGS_MODULE'] = 'online_test.settings' import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler()
\ No newline at end of file +application = django.core.handlers.wsgi.WSGIHandler() |