2007年01月10日 星期三 01:15
×òÌìÕýʽ½«djangoÒƶ¯µ½linuxµÄapacheÏÂÔËÐÐ ½¨Á¢±í¶ÎµÈµÈÕý³£ ¿Éµ±ÎÒ·ÃÎÊÊ×Ò³µÄʱºò£¬¾ÍÏÔʾ£º Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result = object(req) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/modpython.py", line 163, in handler return ModPythonHandler()(req) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/modpython.py", line 136, in __call__ response = self.get_response(req.uri, request) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/base.py", line 115, in get_response return self.get_friendly_error_response(request, resolver) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/base.py", line 123, in get_friendly_error_response return callback(request, **param_dict) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/views/defaults.py", line 88, in server_error t = loader.get_template(template_name) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/template/loader.py", line 79, in get_template return get_template_from_string(*find_template_source(template_name)) File "/usr/local/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/template/loader.py", line 72, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: 500.html ÎÒËÑË÷ÁËһϣ¬Ö»ÓÐÔÚCUµÄһƪÌû×ÓÖÐÓÐÅóÓÑÓöµ½ÁËÕâ¸ö500´íÎ󣬵±Ê±limodouÐÖ°ïÖú½â´ðÁË£¬½á¹û×îºóÒÔÖØ×öÒ»´ÎÀý×Ó½â¾öµô¡£ÓÉÓÚÏîÄ¿ÔÚwinϵÄapacheÀﶼÅܵÄÆðÀ´£¬¶øµ½ÁËlinuxϾͳöÏÖÕâ¸öÎÊÌâ ²»µÃÒÔÇë½ÌÒ»ÏÂÖî룬ÒÔÇó½â»ó¡£ settingÖеÄÄ£°æдµÄÊÇ£º TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates". # Always use forward slashes, even on Windows. "/home/html/public_html/test/templates", ¶¼Õý³£ÄØ Çë½Ì£¡Ð»Ð» -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070110/b53c743d/attachment.html
2007年01月10日 星期三 08:46
首先出现500表示你的程序出错了。在开发环境下,因为debug打开了,所以它会使用admin的500.html来进行处理。如果你的运行环境下找不到500.html来显示错误,所以就是这样。建议你将admin的media目录东西全在apache中配置一下,然后把admin的模板路径加到TEMPLATEDIRS下这样就可以找着了。 -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou
2007年01月11日 星期四 16:06
limodouÐÖ ÎÊÌâÖÕÓÚ½â¾öÁË ÔÀ´ÊÇmod_pythonºÍphpÓгåÍ» æÁ˺ü¸ÌìÁË ´òÈÅlimodouÐÖÎÞÊý´Î¡£Ð»Ð»£¡ ºÇºÇ 2007/1/10, limodou <limodou在gmail.com>: > > Ê×ÏȳöÏÖ500±íʾÄãµÄ³ÌÐò³ö´íÁË¡£ÔÚ¿ª·¢»·¾³Ï£¬ÒòΪdebug´ò¿ªÁË£¬ËùÒÔËü»áʹÓÃadminµÄ500.htmlÀ´½øÐд¦Àí¡£ > Èç¹ûÄãµÄÔËÐл·¾³ÏÂÕÒ²»µ½500.htmlÀ´ÏÔʾ´íÎó£¬ > ËùÒÔ¾ÍÊÇÕâÑù¡£½¨ÒéÄ㽫adminµÄmediaĿ¼¶«Î÷È«ÔÚapacheÖÐÅäÖÃһϣ¬È»ºó°ÑadminµÄÄ£°å·¾¶¼Óµ½TEMPLATEDIRSÏÂÕâÑù¾Í¿ÉÒÔÕÒ×ÅÁË¡£ > > -- > I like python! > UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad > My Blog: http://www.donews.net/limodou > _______________________________________________ > 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 -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070111/1fbb38cb/attachment.html
2007年01月11日 星期四 16:20
On 1/11/07, 风向标 <vaneoooo在gmail.com> wrote: > limodou兄 > 问题终于解决了 > 原来是mod_python和php有冲突 > > 忙了好几天了 > 打扰limodou兄无数次。谢谢! > > 呵呵 有冲突啊。所以我问了你一下,不过我不用php,所以不清楚。解决就好,不麻烦。 -- I like python! UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou
Zeuux © 2025
京ICP备05028076号