【发布时间】:2014-01-16 22:14:54
【问题描述】:
我刚决定学习 Pyramid 并选择 Mako 作为模板语言。我从视图中得到了一个原始 sql 结果列表,如下所示: [{'sample': 'R1_Y200.fq', 'study': 'GaoQiang1'},{'sample': 'R1_Y300.fq', 'study': 'GaoQiang2'},...]
view.py:
@view_config(route_name='example', renderer='example.html')
def templet_test(request):
...
return {'result':search_result}
html:
<html>
...
<table border="1" width="500" align="center" cellpadding="0">
<tr>
<th >study</th>
<th >sample</th>
</tr>
% for item in result:
<tr>
<td valign=top align=center> ${item['study']} </td>
<td valign=top align=center> ${item['sample']} </td>
</tr>
% endfor
</table>
...
</html>
但它没有成功。我收到了这条消息: "内部服务器错误
服务器遇到意外的内部服务器错误
(由服务员生成)"
如何解决?
【问题讨论】:
-
“没有成功”是什么意思?你收到错误信息了吗?它什么也没做?
-
"Internal Server Error 服务器遇到意外的内部服务器错误(由服务员生成)"