From 5f145dd06ad0ad325e24d3d60e11b195ffeec641 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 15 Dec 2010 01:39:37 +0000 Subject: - add support for multiple module_path ( as needed by transifex ), and to not prefix the settings module ( in case of, but not needed now ) --- modules/apache/templates/django.wsgi | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/apache') 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 -- cgit v1.2.1