I've been writing a Django app at work using Windows XP and Apache.
Everything works fine. When I bring the project home to run on
Ubuntu, I'm having trouble getting Apache configured. I've worked on
this problem for about a month but can't seem to get it resolved. It
appears to be fairly common but none of the solutions I've found have
worked.
This works fine on Ubuntu and Windows XP:
$ python manage.py runserver
Shutting down the dev server and going through apache produces this:
File "/usr/lib/python2.5/site-packages/django/conf/__init__.py",
line 86, in __init__
raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s sys.path = %s" %
(self.SETTINGS_MODULE, e, sys.path)
EnvironmentError: Could not import settings 'musicshare.settings' (Is
it on sys.path? Does it have syntax errors?): No module named
musicshare.settings sys.path = ['/home/published/www/django/', '/home/
published/www/django/musicshare', '/usr/lib/python2.5', '/usr/lib/
python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2',
'/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/
local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-
packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/
python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/
gst-0.10', '/var/lib/python-support/python2.5', '/usr/lib/python2.5/
site-packages/gtk-2.0', '/var/lib/python-support/python2.5/gtk-2.0', '/
usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode']
The exception output shows sys.path because I modified Django to
display it. My app is actually located at "/home/published/www/django/
musicshare"
This is my httpd.conf:
<VirtualHost *:80>
ServerName music.mydomain.com
DocumentRoot /home/published/www/django
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonDebug On
PythonPath "['/home/published/www/django/', '/home/
published/www/django/musicshare', '/usr/lib/python2.5'] + sys.path"
<location "/">
SetEnv DJANGO_SETTINGS_MODULE
musicshare.settings
PythonInterpreter musicshare
</location>
</VirtualHost>
Obviously "mydomain" has been replaced as not to publish my domain
name. As you can see in the exception, sys.path includes the location
of my app. It still doesn't appear to find settings.py.
Any ideas?
TIA.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---