我的 Django 项目位于/www/host1/htdocs/my/project
,www
并且my
是指向其他实际文件夹的链接。Apache 启用了 mod_python。我有一个.htaccess
文件project
夹:
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE project.settings
PythonDebug On
PythonOption django.root /my/project
PythonPath "['/www/host1/htdocs/my/project'] + sys.path"
我想我的网站应该可以从 访问http://host1/my/project
,但我看到以下错误:
ImportError: Could not import settings 'project.settings' (Is it on sys.path? Does it have syntax errors?): No module named project.settings
有人可以提出任何建议吗?