On Wed, Apr 07, 2021 at 11:02:04AM -0700,
sebasti...@gmail.com wrote:
> i want to create a Listview like this:
>
> class HistorieListView(ListView):
> model = Address
> template_name = 'marketing/liststandardtemplate.html'
> fieldlist = ('id', 'lastname', 'firstname')
>
> now i want in liststandardtemplate.html that i iterate in tablebody over
> fieldlist:
>
> <tbody>
> {%for element in object_list%}
> <tr>
> {% for field in fieldlist %}
> <td>
> {{ element.field }}
> </td>
> {% endfor %}
> </tr>
> {% endfor %}
> </tbody>
>
> but {{ element.field }} won't work. This is absolut clear why but i have
> no idea how i can create such a template....