| |
Django users |
I've seen various posts with similar problems, but not managed to find I've got an installation of xampp Apache 2.2 and mod_python 3.2.10 and I have mod_python working fine in apache - I can view the contents of a I installed Django - I did this from the latest files via Subversion, I've added details of my project file in a location statement to However, when I open the project in the browser: I get the following error(s) displayed in the browser: Traceback (most recent call last): File "D:\Python25\Lib\site-packages\mod_python\apache.py", line 299, File File File "D:\Python25\lib\site-packages\django\core\handlers\base.py", File "D:\Python25\lib\site-packages\django\conf\__init__.py", line File "D:\Python25\lib\site-packages\django\conf\__init__.py", line File "D:\Python25\lib\site-packages\django\conf\__init__.py", line EnvironmentError: Could not import settings 'myproject.settings' (Is it <Location "/,yproject/"> I've tried manually adding to sys.path the directories of the django Can anyone give me any pointers for resolving this behaviour?
consistent advice on trouble shooting this issue.
Python 2.5. Running on Windows 2003 server.
simple python file (mptest from mod_python testing).
because the install file on Official version failed several times (the
note said Python 2.5 may cause problems)
httpd.conf.
http://localhost:8888/myproject/
-----------------------------------------------
Mod_python error: "PythonHandler django.core.handlers.modpython"
in HandlerDispatch
result = object(req)
"D:\Python25\lib\site-packages\django\core\handlers\modpython.py", line
177, in handler
return ModPythonHandler()(req)
"D:\Python25\lib\site-packages\django\core\handlers\modpython.py", line
145, in __call__
self.load_middleware()
line 22, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
27, in __getattr__
self._import_settings()
54, in _import_settings
self._target = Settings(settings_module)
82, in __init__
raise EnvironmentError, "Could not import settings '%s' (Is it on
sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
on sys.path? Does it have syntax errors?): No module named
myproject.settings
------------------------------------------
My httpd.conf file has the following settings at the end:
--
<Directory "d:/program files/xampp/htdocs/test">
AllowOverride FIleinfo
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
SetHandler python-program
PythonPath "['d:/program files/xampp/htdocs/myproject'] + sys.path"
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE myproject.settings
PythonDebug On
</Location>
--
I've checked the "import django" from the python command line and there
were no errors, so I believe it's installed and accessible.
installation and my project with no effect. I'm wondering whether by
manually installing the django files from subversion I missed some key
settings, but I've not found any notes to allow me to check.