【发布时间】:2018-03-31 12:53:09
【问题描述】:
我正在使用 Google App Engine webapp2 框架构建一个简单的网站来统计和收集所有提交的投标。我已经从名为“预订”的数据库中读取了每个出价。
目前,对于所有提交的投标,只有一个表格可以显示。我如何使用 jinja2 为不同的 IssueName 创建不同的表。
例如,如果IssueName=Bond1,则表1收集了bond1的所有出价;如果IssueName=Bond2,则表2收集了bond2的所有投标
<table class="table table-striped">
<thead>
<tr>
<th>IssueName</th>
<th>RM Name</th>
<th>Customer</th>
<th>Price</th>
<th>Notional</th>
<th>Bid Time</th>
</tr>
</thead>
{% for bid in Book %}
<tbody>
<tr>
<th>{{ bid.IssueName }}</th>
<th>{{ bid.RMName }}</th>
<th>{{ bid.CustomerName }}</th>
<th>{{ bid.BidPrice }}</th>
<th>{{ bid.Notional }}</th>
<th>{{ bid.BidTime }}</th>
</tr>
</tbody>
{% endfor %}
</table>
【问题讨论】:
标签: google-app-engine jinja2 webapp2