loader.get_template(template_name) # You need to create a 500.html template

来源:互联网 发布:win7系统查看mac地址 编辑:程序博客网 时间:2024/05/18 17:59

大家在使用apache+mod_python的时候在目录/var/www添加了404.html和500.html,以及在Settings.py中的dubug=flase,但是当View中抛出异常后,去加载template就会报出:
  loader.get_template(template_name) # You need to create a 500.html template

 

最省劲的解决方法:在你的template根目录下,添加一个500.html,就可以了。

原创粉丝点击