[Fixed]-ImportError: Environment variable DJANGO_SETTINGS_MODULE is undefined

9👍

You need to be able to import the value of DJANGO_SETTINGS_MODULE when you’re in a location that isn’t in your project root. One easy way of doing that is to (1) add the parent of your project folder to PYTHONPATH, (2) change DJANGO_SETTINGS_MODULE to projectfoldername.settings.

Leave a comment