Hello i have spend 2 days on this error. couldnt figure it out.
an 21 00:19:50 2011] [error] [client 127.0.0.1] ImportError: Could not import settings 'mysite.settings' (Is it on sys.path? Does it have syntax errors?): No module named settings
django.wsgi located in /user/local/django/apache
import os, sys
sys.path.append('/usr/local/django')
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
my django project named mysite: located in /user/local/django/mysite/scr/ (here contains settings.py init.py and etc...)
apache conf
Alias /media/ /usr/local/django/media
<Directory /usr/local/django/media>
Order deny,allow
Allow from all
</Directory>
<Directory /usr/local/django/apache/>
Order deny,allow
Allow from all
</Directory>
WSGIScriptAlias / /usr/local/django/apache/django.wsgi
i have changed the mysite folder above with permission 777 to avoid any permission issues. and i restart httpd service everytime.
apache starts up and find django.wsig. but it can not find the setting file specifed in it.
and i add the path to $PATH manually and echo it. it is there. and i restart httpd. then the path i added is gone...
anyone knows what is going on?
thanks