Reputation: 357
I need to display all data from models in Django
I have two list one has all rows and another has all columns, what is want to do something like
{{student.username }}
I am trying to use nested loop to get all data, I know this "row.{{column}} " is wrong but did not find the solutions
{% for row in rows %}
<tr>
{% for column in columns %}
<td>{{ row.{{column}} }}</td>
{% endfor %}
</tr>
{% endfor %}
can any one guide me how to use like this manner?
Upvotes: 2
Views: 206