below is code
in the views.py
def detail(request): ...... v_context={ "data":df.to_dict('records'), } return render(request,'detail.html',context=v_context)
in the template
{% for i in data%}
<table style="width:100%">
<tr>
<th>date</th>
<th>close</th>
</tr>
<tr>
<td>{{i.date}}</td>
<td>{{i.close}}</td>
</tr>
</table>
{%endfor %}
================ end code===
Just wonder why in template, not using i['data'] or i['close'].
Thanks