【发布时间】:2018-05-16 15:33:32
【问题描述】:
我有一个路由方法:
@app.route('/add', methods=['GET'])
def add_view():
return render_template('add.html', categories=api.categories())
然后我尝试在模板add.html 中将categories 显示为JSON:
{{ categories | json }}
没有用
【问题讨论】:
-
请提供更多关于什么不起作用的详细信息,确切地说。错误消息,错误的行为描述,一切