Apache ImportError: Could not import settings

2009-01-31 Thread DragonSlayre

Hi,

I'm at the final stage in one of my django developments, and am trying
to get my site live.

I've been following instructions on
http://www.jeffbaier.com/2007/07/26/installing-django-on-an-ubuntu-linux-server/
but got the following error:

  File "/usr/lib/python2.5/site-packages/django/conf/__init__.py",
line 94, in __init__
raise ImportError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE,
e)

ImportError: Could not import settings 'kazbah.settings' (Is it on
sys.path? Does it have syntax errors?): No module named
kazbah.settings


My ubuntu username is git, and the site I've made (kazbah) is at /home/
git/DjangoProjects/kazbah
My httpd.conf settings look like this:


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE kazbah.settings
PythonDebug On
PythonPath "['/home/git/DjangoProjects'] + sys.path"



SetHandler None



SetHandler None



SetHandler None



Any ideas about why my settings can't be found?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Apache ImportError: Could not import settings

2009-02-02 Thread Bradley Wright

I had the following vhost.conf, which worked for me (before I switched
to WSGI):

NameVirtualHost 127.0.0.1

# dynamic Django site

ServerAdmin myem...@mysite.com

ServerName mysite.com

SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonDebug Off
SetEnv DJANGO_SETTINGS_MODULE "apps.production_settings"

PythonPath "['/var/www/sites/mysite'] + sys.path"

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
ErrorLog /var/log/apache2/mysite.error.log

ServerSignature Off



/var/www/sites/mysite/apps/production_settings.py was owned by the www-
data user (which Apache runs under in Debian-like environments) and
was read only (chmod 400).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Apache ImportError: Could not import settings

2009-02-02 Thread tygielzchaosem

same here; hasn't something been messed up since some recent svn
commits?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---