I am using Eclipse 3.7.2 and Pydev 2.6 to develop Django program. When I upgrade my Django from 1.3 to 1.4.1, I find a question about "DJANGO_SETTINGS_MODULE" environment variable. When I run manage.py in console, "DJANGO_SETTINGS_MODULE" is None first, and via
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test.settings")
will get value correctly.
But when I run code in PyDev, the environment is be set "folder_name.settings" before program. Even if in non Django program. And I can't find any way to change the value.
How can I set the value outside my program?
Thanks.
The appropriate value for DJANGO_SETTINGS_MODULE
can be set through the Eclipse UI:
Right click on the project folder in the explorer window
Select Properties
Select the PyDev - Django
properties page. You will see a place to enter the correct setting. If this is blank, PyDev appears to choose a "reasonable" default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With