I need to create a 100-cell table, and in each cell if the corresponding entity exists, display it's information, otherwise, display "Empty". How do I do that? The python program (Item has properties of "seqNumber" and "name"):
query = db.Query(Item)
items = query.fetch(100)
render(..., {'range100':range(100), 'items':items}, ...)
HTML:
<table>
<tr>
{% for i in range100 %} <!-- for item in items (how?) -->
<td>
{% if item.seqNumber == forloop.counter (how?) %}
{{item.name}}
{% else %}
Empty
{% endif %}
{% endfor %}
</tr>
</table>