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

大家在使用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,就可以了。

你可能感兴趣的:(template)