How To Export .csv With Django-tables2?
I'm trying to export a table in .csv with Django-Tables2, I've done the following so far. tables.py class ClientTable(ColumnShiftTable): class Meta: model = Client
In template.html
I added {% load django_tables2%}
I passed SingleTableMixin
as the 'ClientsView' parameter.
In ClientTable
I added export_formats = ['csv', 'xlsx']
This solved my problem.
Post a Comment for "How To Export .csv With Django-tables2?"