2007年07月13日 星期五 14:33
想把Django集成到apache+mod_python中,总是有如下错误: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target result = object(arg) File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 177, in handler return ModPythonHandler()(req) File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", line 145, in __call__ self.load_middleware() File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", line 22, in load_middleware for middleware_path in settings.MIDDLEWARE_CLASSES: File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", line 28, in __getattr__ self._import_settings() File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", line 55, in _import_settings self._target = Settings(settings_module) File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", line 83, in __init__ raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e) EnvironmentError: Could not import settings 'kweb.settings' (Is it on sys.path? Does it have syntax errors?): No module named kweb.settings 在 /etc/httpd/conf.d/python.conf 中我是这么配的: ....SetHandler python-program PythonPath "['/home/test'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE kweb.settings PythonDebug On .... kweb 这个包是在 /home/test/ 下边的,而且我用 kweb/manager.py runserver 是可以正常运行起来的
2007年07月13日 星期五 14:39
ÄãµÄdjangoµÄpermissionsÓÐÎÊÌ⣬ҪÓÐroot:root ÄãÊDz»ÊÇÓÃsvn co µÄversion >From: cafeeee <cafeeee在gmail.com> >Reply-To: python-chinese在lists.python.cn >To: python-chinese在lists.python.cn >Subject: [python-chinese] Django¼¯³Éapache+mod_python >Date: Fri, 13 Jul 2007 14:33:05 +0800 > >想把Django集成到apache+mod_python中,总是有如下错误: > >Traceback (most recent call last): > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line >1537, in HandlerDispatch > default=default_handler, arg=req, silent=hlist.silent) > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line >1229, in _process_target > result = _execute_target(config, req, object, arg) > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line >1128, in _execute_target > result = object(arg) > > File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", >line 177, in handler > return ModPythonHandler()(req) > > File "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", >line 145, in __call__ > self.load_middleware() > > File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", >line 22, in load_middleware > for middleware_path in settings.MIDDLEWARE_CLASSES: > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", >line 28, in __getattr__ > self._import_settings() > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", >line 55, in _import_settings > self._target = Settings(settings_module) > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", >line 83, in __init__ > raise EnvironmentError, "Could not import settings '%s' (Is it on >sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, >e) > >EnvironmentError: Could not import settings 'kweb.settings' (Is it on >sys.path? Does it have syntax errors?): No module named kweb.settings > > >å?/etc/httpd/conf.d/python.conf ä¸ææ¯è¿ä¹é çï¼ >.... >> SetHandler python-program > PythonPath "['/home/test'] + sys.path" > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE kweb.settings > PythonDebug On > >.... > > >kweb è¿ä¸ªå æ¯å?/home/test/ ä¸è¾¹çï¼èä¸æç¨ kweb/manager.py runserver 是可以正常运行起来的 >_______________________________________________ >python-chinese >Post: send python-chinese在lists.python.cn >Subscribe: send subscribe to python-chinese-request在lists.python.cn >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >Detail Info: http://python.cn/mailman/listinfo/python-chinese _________________________________________________________________ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà Live Messenger; http://get.live.com/messenger/overview
2007年07月13日 星期五 14:43
¹ûÈ»ÊÇȨÏÞµÄÎÊÌ⣬ÎÒ°Ñkweb·ÅÔÚÁËhomeĿ¼Ï£¬apache¿ÉÄÜ·ÃÎʲ»µ½.... ¶àл¶àл On 7/13/07, cun heise <cunheise在hotmail.com> wrote: > ÄãµÄdjangoµÄpermissionsÓÐÎÊÌ⣬ҪÓÐroot:root > ÄãÊDz»ÊÇÓÃsvn co µÄversion > > > >From: cafeeee <cafeeee在gmail.com> > >Reply-To: python-chinese在lists.python.cn > >To: python-chinese在lists.python.cn > >Subject: [python-chinese] Django¼¯³Éapache+mod_python > >Date: Fri, 13 Jul 2007 14:33:05 +0800 > > > >æ³æDjangoéæå°apache+mod_pythonä¸ï¼æ»æ¯æå¦bä¸éè¯¯ï¼ > > > >Traceback (most recent call last): > > > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line > >1537, in HandlerDispatch > > default=default_handler, arg=req, silent=hlist.silent) > > > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line > >1229, in _process_target > > result = _execute_target(config, req, object, arg) > > > > File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line > >1128, in _execute_target > > result = object(arg) > > > > File > "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", > >line 177, in handler > > return ModPythonHandler()(req) > > > > File > "/usr/lib/python2.5/site-packages/django/core/handlers/modpython.py", > >line 145, in __call__ > > self.load_middleware() > > > > File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", > >line 22, in load_middleware > > for middleware_path in settings.MIDDLEWARE_CLASSES: > > > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", > >line 28, in __getattr__ > > self._import_settings() > > > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", > >line 55, in _import_settings > > self._target = Settings(settings_module) > > > > File "/usr/lib/python2.5/site-packages/django/conf/__init__.py", > >line 83, in __init__ > > raise EnvironmentError, "Could not import settings '%s' (Is it on > >sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, > >e) > > > >EnvironmentError: Could not import settings 'kweb.settings' (Is it on > >sys.path? Does it have syntax errors?): No module named kweb.settings > > > > > >å?/etc/httpd/conf.d/python.conf ä¸ææ¯è¿ä¹é çï¼ > >.... > >> > SetHandler python-program > > PythonPath "['/home/test'] + sys.path" > > PythonHandler django.core.handlers.modpython > > SetEnv DJANGO_SETTINGS_MODULE kweb.settings > > PythonDebug On > > > >.... > > > > > >kweb è¿ä¸ªå æ¯å?/home/test/ ä¸è¾¹çï¼èä¸æç¨ kweb/manager.py > runserver 是可以正常运行起来的 > >_______________________________________________ > >python-chinese > >Post: send python-chinese在lists.python.cn > >Subscribe: send subscribe to python-chinese-request在lists.python.cn > >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > >Detail Info: http://python.cn/mailman/listinfo/python-chinese > > _________________________________________________________________ > ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà Live Messenger; > http://get.live.com/messenger/overview > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese >
Zeuux © 2025
京ICP备05028076号