So for a project i'm working on, i want to return data into a table. It is basically this query that gets the data:
search_result = sp.search(q=search_query, limit=20)
response = []
for i, t in enumerate(search_result['tracks']['items']):
response += i, t['name']
And in the template I try to display the data from the response as follow
<tbody>
{% for data in response %}
<tr>
<td>{{data}}</td>
</tr>
{% endfor %}
</tbody>
Only the data is now being display in a wrong way:
------------------------
0
------------------------
[data here]
------------------------
1
------------------------
[data here]
I just started programming in python/django, so I am not sure how to display it in a way that the number and data are on the same row, or if I can display it without the integer