我一直在使用bottlepy,我有这样的事情:
..code..
comments = [(u'34782439', 78438845, 6, u'hello im nick'),
(u'34754554', 7843545, 5, u'hello im john'),
(u'332432434', 785345545, 3, u'hello im phil')]
return comments
在视图中我已经这样做了:
%for address date user text in comments:
<h3>{{address}}</h3>
<h3>{{date}}</h3>
<h3>{{user}}</h3>
<h3>{{text}}</h3>
%end
当我启动服务器时,错误是:
Error 500: Internal Server Error
Sorry, the requested URL http://localhost:8080/hello caused an error:
Unsupported response type: <type 'tuple'>
我怎么能把它渲染到视图中?
(对不起我的英语)