KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The app runs fine using django internal server however when I use apache + mod_python I get the below error File "/usr/local/lib/python2.6/dist-packages/django/conf/__init__.py", line 75, 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 'settings' (Is it on sys.path? Does it have syntax errors?): No module named settings Here is the needed information 1) Project directory: /root/djangoprojects/mysite 2) directory listing of /root/djangoprojects/mysite ls -ltr total 28 -rw-r--r-- 1 root root 546 Aug 1 08:34 manage.py -rw-r--r-- 1 root root 0 Aug 1 08:34 __init__.py -rw-r--r-- 1 root root 136 Aug 1 08:35 __init__.pyc -rw-r--r-- 1 root root 2773 Aug 1 08:39 settings.py -rw-r--r-- 1 root root 1660 Aug 1 08:53 settings.pyc drwxr-xr-x 2 root root 4096 Aug 1 09:04 polls -rw-r--r-- 1 root root 581 Aug 1 10:06 urls.py -rw-r--r-- 1 root root 314 Aug 1 10:07 urls.pyc 3) App directory : /root/djangoprojects/mysite/polls 4) directory listing of /root/djangoprojects/mysite/polls ls -ltr total 20 -rw-r--r-- 1 root root 514 Aug 1 08:53 tests.py -rw-r--r-- 1 root root 57 Aug 1 08:53 models.py -rw-r--r-- 1 root root 0 Aug 1 08:53 __init__.py -rw-r--r-- 1 root root 128 Aug 1 09:02 views.py -rw-r--r-- 1 root root 375 Aug 1 09:04 views.pyc -rw-r--r-- 1 root root 132 Aug 1 09:04 __init__.pyc 5) Anywhere in the filesystem running import django in python interpreter works fine 6) content of httpd.conf <Location "/mysite"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonOption django.root /mysite PythonPath "['/root/djangoprojects/', '/root/djangoprojects/mysite','/root/
Tags (comma-separated)
Save Edits
Cancel