aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache/templates/django.wsgi
diff options
context:
space:
mode:
Diffstat (limited to 'modules/apache/templates/django.wsgi')
-rw-r--r--modules/apache/templates/django.wsgi11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/apache/templates/django.wsgi b/modules/apache/templates/django.wsgi
index 194e28d8..aa0b82c8 100644
--- a/modules/apache/templates/django.wsgi
+++ b/modules/apache/templates/django.wsgi
@@ -1,7 +1,16 @@
#!/usr/bin/python
import os, sys
-sys.path.append('<%= module_path %>')
+<%- for m in module_path -%>
+path = '<%= m %>'
+if path not in sys.path:
+ sys.path.append(path)
+<%- end -%>
+
+<%- if django_module -%>
os.environ['DJANGO_SETTINGS_MODULE'] = '<%= django_module %>.settings'
+<%- else -%>
+os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
+<%- end -%>
import django.core.handlers.wsgi