From 50e4eb3225acbb54d81f1348e1359d04a6e40fea Mon Sep 17 00:00:00 2001
From: Bastian Kleineidam <calvin@debian.org>
Date: Fri, 25 Jan 2008 23:01:29 +0100
Subject: Don't clobber a set DJANGO_SETTINGS_MODULE
Only set the DJANGO_SETTINGS_MODULE value if it is not already set.
Signed-off-by: Bastian Kleineidam <calvin@debian.org>
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py
index d78e2ed..ea40ab8 100644
a
|
b
|
def setup_environ(settings_mod):
|
252 | 252 | sys.path.pop() |
253 | 253 | |
254 | 254 | # Set DJANGO_SETTINGS_MODULE appropriately. |
255 | | os.environ['DJANGO_SETTINGS_MODULE'] = '%s.%s' % (project_name, settings_name) |
| 255 | if 'DJANGO_SETTINGS_MODULE' not in os.environ: |
| 256 | os.environ['DJANGO_SETTINGS_MODULE'] = \ |
| 257 | '%s.%s' % (project_name, settings_name) |
256 | 258 | return project_directory |
257 | 259 | |
258 | 260 | def execute_from_command_line(argv=None): |