loader.get

    技术2022-05-20  26

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


    最新回复(0)