0
林厌倦了试图把这个工作:( 所以,这里是我的问题:Django的 - 阿帕奇整合
添加到httpd.conf文件:
Location "/ps3t/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE ps3t.settings
PythonOption django.root /ps3t
PythonDebug On
PythonPath "['/home/fabriciols'] + sys.path"
/Location>
- 去掉了“< “从本地,但在我的httd.conf有
但是,当我访问我的网站时:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.4/site-packages/django/core/handlers/modpython.py", line 191, in __call__
self.load_middleware()
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py", line 33, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 268, in __getattr__
self._setup()
File "/usr/lib/python2.4/site-packages/django/conf/__init__.py", line 40, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.4/site-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 'ps3t.settings' (Is it on sys.path? Does it have syntax errors?): No module named ps3t.settings
我的项目结构:
/home/fabriciols/ - root dir
./ps3t - project
./ps3t/myps3t - app
每个用户在所有文件中读取烫发......
什么即时做错了什么? :/
你有使用mod_python的很好的理由吗?这具有不可预测的内存使用问题; mod_wsgi是推荐的选择。 – 2009-12-13 12:10:59
,因为我不知道:) 现在安装在我的服务器上,我会用它来查看它是否好。 他比mod_python好多了? – fabriciols 2009-12-14 10:36:19