I am using Eclipse 3.7.2 and Pydev 2.6 to develop a Django program. When I upgrade Django from 1.3 to 1.4.1, I find a question about the DJANGO_SETTINGS_MODULE environment variable. When I run manage.py in the console, "DJANGO_SETTINGS_MODULE" is first None, and through
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")
will get the value correctly.
But when I run the code in PyDev, the environment "folder_name.settings" is set in front of the program. Even if the program does not have Django. And I can not find a way to change the value.
How to set a value outside my program?
Thank.
source
share