Closed pvanek closed 6 years ago
Hello @pvanek because of how django-tables2-column-shifter works (storing selected invisible columns to the localStorage using javascript) you'll need to also use javascript to modify the query so that the excluded columns would be passed to Django. I don't think it is possible to implement this using querystring.
For this you can use the $.django_tables2_column_shifter_hidden()
API call to retrieve the hidden column names (see #11), modify the query to pass these columns along with the _export=format
to the backend and finally capture the column names in the backend and pass them to the Exporter
. Take a look at my comment on #9 to see a more thorough explanation.
When I'll find the time I'll provide a complete template + backend for this functionality.
I'm evaluating this cool addon to tables2. Is it possible to extend the export tool of tables2 to take handle only selected columns from column-shifter?
https://django-tables2.readthedocs.io/en/latest/pages/export.html
Something with
querystring
probably?https://django-tables2.readthedocs.io/en/latest/pages/template-tags.html#querystring
This is my playground template.