{% extends "layout.html" %}
{% block title %}
Index
{% endblock %}
{% block main %}
<table style="width: 100%">
<tr>
<th>Symbol</th>
<th>Name</th>
<th>Price</th>
<th>Shares</th>
<th>Total</th>
</tr>
<ul id=positions>
<tr>
{% for symbol, name, price, shares, total in positions %}
<dt>{{symbol.symbol}}</dt>
<dt>{{name.name}}</dt>
<dt>{{price.price}}</dt>
<dt>{{shares.shares}}</dt>
<dt>{{total.total}}</dt>
{% endfor %}
</tr>
</ul>
</table>
{% endblock %}
Please see my code above. I have made a jinja code to display index. The problem I have is that only partital output is given and the table headers are under the output. Could please anyone clear up what I do wrong.
Output for positions is:
[[{'name': 'Alphabet Inc.'}, {'price': 750.5}, {'symbol': 'GOOG'}, {'shares': 1}, {'total': '$750.50'}], [{'name': 'InterXion Holding N.V. Ordinary'}, {'price': 32.63}, {'symbol': 'INXN'}, {'shares': 4}, {'total': '$130.52'}], [{'name': 'St. Joe Company (The) Common St'}, {'price': 20.25}, {'symbol': 'JOE'}, {'shares': 2}, {'total': '$40.50'}], [{'name': 'Royal Dutch Shell PLC Royal Dut'}, {'price': 51.92}, {'symbol': 'RDS-A'}, {'shares': 8}, {'total': '$415.36'}]]