I tried:
list1 = [{\"username\": \"abhi\", \"pass\": 2087}]
return render_template(\"file_output.html\", list1=list1)
In the template:
**get id from dic value. I got the result.try the below code**
get_abstracts = s.get_abstracts(session_id)
sessions = get_abstracts['sessions']
abs = {}
for a in get_abstracts['abstracts']:
a_session_id = a['session_id']
abs.setdefault(a_session_id,[]).append(a)
authors = {}
# print('authors')
# print(get_abstracts['authors'])
for au in get_abstracts['authors']:
# print(au)
au_abs_id = au['abs_id']
authors.setdefault(au_abs_id,[]).append(au)
**In jinja template**
{% for s in sessions %}
Session : {{ s.session_title}} - Hall : {{ s.session_hall}}
{% for a in abs[s.session_id] %}
Chief Author : Dr. {{ a.full_name }}
{% for au in authors[a.abs_id] %}
{{ au.role }} : Dr.{{ au.full_name }}
{% endfor %}
{% endfor %}
{% endfor %}