Allow exporting change list verbatim
treyhunner opened this issue · comments
Example which does not work because values in "headers" are expected to be model fields:
class SomeModelAdmin(TablibAdmin):
list_display = ['id', 'name']
formats = ['xls', 'csv']
headers = list_display
def name(self, obj):
return "{0} {1}".format(obj.first_name, obj.last_name)
The fields could be rendered similarly to the way the change list fields are rendered.