Hello, 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.... I want a flexible Listview Template that i can use with every model and can set in fieldlist which columns are shown in listview. When field ist a foreignkey field then __str__ from related model is shown... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/57cdad08-09d3-41c3-ae3a-32fff0ae6678n%40googlegroups.com.