I’ve been having problems with the DJANGO_SETTINGS_MODULE variable. For instance, I was following the tutorial in the Django Book and stumbled across the following error:
ImportError: Could not import settings ‘mysite.settings’ (Is it on sys.path? Does it have syntax errors?): No module named mysite.settings
The trick is not simply
export DJANGO_SETTINGS_MODULE=settings
but also to create a .pth file within the /site-packages/ folder in the python installation that contains a path to your project directory. That should do the trick.
Got Thoughts?
By all means share them, and start the conversation.
Leave Your Own Comment
You can follow any responses to this entry via its RSS comments feed. You can also leave a trackback if the inclination is there.