IT Milk: entry

The author published this entry on Monday 07 July, 2008 at 8:04 pm. It's been filed in the Web Developmentcategory

Django environmental settings problem with DJANGO_SETTINGS_MODULE variable

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.

If you're looking for something specific then give the search form below a try:

RSS Wordpress Grady (theme) Valid XHTML Return to the Top ↑