我从服务器api获取了json数据并显示在网页上。虽然它总是显示如下:
读取数据源数据如下:
如何使用“hello world”的新行显示它?
答案 0 :(得分:1)
根据Templetor - The web.py templating system (web.py):
过滤
默认情况下,Templetor使用web.websafe过滤器进行HTML编码。
>>> render.hello("1 < 2") "Hello 1 < 2"
关闭过滤器使用:$ 之后。例如:
The following will not be html escaped. $:form.render()
所以,将$item
...替换为$:item
....