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

遇到一个错误:

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:	GET
Request URL:	http://someip:someport/show/getpoptable/?item=source%20codes&name=project
Django Version:	1.6.2
Exception Type:	TemplateSyntaxError
Exception Value:	
Invalid block tag: 'static'
Exception Location:	/usr/lib/python2.6/site-packages/django/template/base.py in invalid_block_tag, line 332
Python Executable:	/usr/bin/python
Python Version:	2.6.6
Python 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文件。

你可能感兴趣的:(django 编程如果遇到500错误怎么办)