我尝试这样使用http://jinja.pocoo.org/docs/dev/templates/#pprint pprint函数:
{{ pprint(player) }},但我得到以下错误:
jinja2.exceptions.UndefinedError
UndefinedError: 'pprint' is undefinedJinja2是python的模板引擎。有没有人可以帮我显示变量以方便调试?
发布于 2014-09-09 00:27:57
你必须这样使用它:
{{ flash_messages|pprint }}或者在你的例子中:
{{ player|pprint}}https://stackoverflow.com/questions/25728708
复制相似问题