6 messages in com.googlegroups.django-usersRe: ImportError: No module named mysi...
FromSent OnAttachments
Mark PhillipsMay 14, 2007 2:07 am 
Malcolm TredinnickMay 14, 2007 2:12 am 
Steven ArmstrongMay 14, 2007 2:12 am 
Mark PhillipsMay 14, 2007 7:13 am 
ilDaveMay 14, 2007 7:40 am 
Mark PhillipsMay 15, 2007 8:18 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: ImportError: No module named mysite.settingsActions...
From:Malcolm Tredinnick (malc@pointy-stick.com)
Date:May 14, 2007 2:12:08 am
List:com.googlegroups.django-users

On Mon, 2007-05-14 at 02:07 -0700, Mark Phillips wrote:

Decided to try a clean slate. Set up Django on SME Server 7.1, which is based on Centos 4. Compiled and installed mod_python Amended httpd.conf as follows:

LoadModule python_module modules/mod_python.so

and later on in the file... <Location "/mysite/"> SetHandler python-program PythonPath "['/usr/local/mysite'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonDebug On PythonAutoReload On </Location>

Standard import path blunder: if you are going to import the thing as mysite.settings, then the directory containing mysite/ had better be on your python path (i.e. /usr/local/). With the way you've set your PythonPath up, you probably want just "settings" as your DJANGO_SETTINGS_MODULE.

Regards, Malcolm