html:
<div class="chats">
<div class="messages">
{% for chat in chats %}
<div class="chat_name"> {{chat.first_name}} {{chat.last_name}} </div>
{% endfor %}
</div>
</div>
python в функции:
print(chats)
return render_template("index.html", chats = chats)
chats:
[[{'first_name': 'Никита', 'id': 531569595, 'last_name': 'Нефёдов', 'photo_max_orig': 'https://sun1-94.userapi.com/s/v1/ig2/jvKuCIV2JvH_nUo6VUY8gMngAEMlDOmbAt0XPL3yo1AqV_NAsoBziNJ0ubOuyJYJr8EJAJFhsBRpdL_rvrkRDMW_.jpg?size=400x0&quality=96&crop=20,20,529,529&ava=1'}], [{'first_name': 'Влад', 'id': 582050646, 'last_name': 'Некрасов', 'photo_max_orig': 'https://sun1-85.userapi.com/s/v1/ig2/58-6Vq4wsmfcDSzZ9l_7fwNJ_6SKaTce_QiENpAiLegyaAL-SgcApzlmgvg4YaLF9fDESZ761vJl_9htQ4Q_gVjD.jpg?size=400x0&quality=96&crop=0,269,1620,1620&ava=1'}], [{'first_name': 'Даша', 'id': 534249856, 'last_name': 'Некрасова', 'photo_max_orig': 'https://sun1-84.userapi.com/s/v1/ig2/pcQiIfW174Ab3olyKVB5gDDLtc1_IXUrdFvtkq4fVSPzesOnVMZefqBsbdxfifKCQ1BhkTD-XnGqiawws9-Oe7Cr.jpg?size=400x0&quality=96&crop=0,50,979,979&ava=1'}], [{'first_name': 'Вадим', 'id': 446404134, 'last_name': 'Хочкин', 'photo_max_orig': 'https://sun1-20.userapi.com/s/v1/ig2/lKEmTHc4m_mRbO1TY22H5akOozdEvqt3OopcffhpuHRDdnnmuhonGvJiRjHCgSoSXInRAd8AU_jCELRllQX3jJoF.jpg?size=400x0&quality=96&crop=3,8,737,737&ava=1'}], [{'first_name': 'Жила', 'id': 559702356, 'last_name': 'Завр', 'photo_max_orig': 'https://sun1-87.userapi.com/s/v1/ig2/Q1YcaNvNQTqFCbsO-jeP9oSNVID0W6qq6KeDT5fT9Uak7zTLazX6IqKwX6XfEUmDy_ixG4s5acSP77FzVCcTnYn_.jpg?size=400x0&quality=96&crop=0,0,544,1080&ava=1'}], [{'first_name': 'Ваня', 'id': 493899141, 'last_name': 'Еремин', 'photo_max_orig': 'https://sun1-19.userapi.com/s/v1/ig2/rjKdEqf0hilwN55LCPexz1KuEHZ9bwRo-gUSnzFkOCRLk1JNLwmBLSqrgkm3RLo9yTP8ARjH156QHwq1BrjCOBWz.jpg?size=400x0&quality=96&crop=198,459,1227,1227&ava=1'}]]
Но если выводить chat вместо chat.first_name то все работает