you're not writing your html as you should. you need to insert <li> tags
<li>
<ul> {% for i in df %} # tried many option here <li>{{ i['foo'] }}</li> {% endfor %} <ul>