I have a list of filtered value from
SQL:
in views.py
name_list=list(AB.objects.filter(name__in=xyz).values_list('name', 'surname', 'sector','industry', 'country','city'))
in template.html:
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{ name }} </li></ul>
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{surname}} </li></ul>
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{sector}} </li></ul>
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{industry}} </li></ul>
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{country}} </li></ul>
<ul><li>{% for name, surname,sector,industry,country,city in name_list %} {{city}} </li></ul>
Output of it is :
Alex Klein Machinery Aerospace USA Kansas
Lia Michelle Healthcare Drugs Ireland Dublin
I want to add names to each columns such as Name, Surname, Sector, Industry, Country, City and insert them in table. I made ul and li as I di not know how to insert them in table
Desired output is table the following way :
Name Surname Sector Industry Country City
Alex Klein Machinery Aerospace USA Kansas
Lia Michelle Healthcare Drugs Ireland Dublin
Would appreciate your help.