I'd like to create HTML template likes the followings.
・models.py
class Client(Model):
name = CharField(max_length=50)
email = EmailField(max_length=100, verbose_name="E-mail")
title = CharField(max_length=50)
department = CharField(max_length=50)
・Data
| Name | Mail | Title | Department |
| John | john@mailaddress.com | engineer | development |
| Bob | bob@mailaddress.com | engineer | development |
| Sam | sam@mailaddress.com | engineer | development |
・views.py
class myListView(, ListView):
model = Client
template_name = "template.html"
・template.html
<table>
<tbody>
{% for item in object_list %}
<tr>
<td>{{ item }}</td>
</tr>
{% endfor %}
<!--- table items end -->
</tbody>
</table>
・Expectation(table)
| John | john@mailaddress.com | engineer | development |
| Bob | bob@mailaddress.com | engineer | development |
| Sam | sam@mailaddress.com | engineer | development |
I don't want to write all keys in template file, because my product data has too many columns.
Could you tell me how to make a template please ?