django 编程如果遇到500错误怎么办

来源:互联网 发布:nginx 虚拟主机的配置 编辑:程序博客网 时间:2024/04/29 22:56

遇到一个错误:

Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR) http://someip:someport/show/getpoptable/?item=source%20codes&name=project


光看提示就是服务器无法返回后面网址对应的页面,具体原因光看这一行错误提示是没用的,所以要把后面的url输入浏览器,看到底是什么错误:

TemplateSyntaxError at /show/getpoptable/Invalid block tag: 'static'Request Method:GETRequest URL:http://someip:someport/show/getpoptable/?item=source%20codes&name=projectDjango Version:1.6.2Exception Type:TemplateSyntaxErrorException Value:Invalid block tag: 'static'Exception Location:/usr/lib/python2.6/site-packages/django/template/base.py in invalid_block_tag, line 332Python Executable:/usr/bin/pythonPython Version:2.6.6Python Path:['/home/chao/perf-monitor-platform/webServer', '/usr/lib64/python2.6/site-packages/Twisted-13.2.0-py2.6-linux-x86_64.egg', '/usr/lib64/python2.6/site-packages/zope.interface-4.0.5-py2.6-linux-x86_64.egg', '/usr/lib64/python2.6/site-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg', '/usr/lib/python2.6/site-packages/gitosis-0.2-py2.6.egg', '/usr/lib/python2.6/site-packages/flup-1.0.3.dev_20110405-py2.6.egg', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gst-0.10', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/webkit-1.0', '../']Server time:Mon, 10 Mar 2014 02:55:51 +0000


这样就错误原因就清除了,就是没有加上{% load staticfiles %}这句话,所以加载不了static文件。

0 0
原创粉丝点击