diekleinemy
diekleinemy

Reputation: 27

How to hide/show columns according to user input using django-tables2

I have a table with many columns (and rows), which I render using {% render_table table_all %} in a html template of my django app. I want to display certain columns and give the user the choice to show additional columns (using f.ex. a checkbox or drop-down menu).

Is this possible with django-tables2? Or do I have to use javascript?

Upvotes: 1

Views: 1670

Answers (1)

Jieter
Jieter

Reputation: 4229

Maybe django-tables2-column-shifter suits your needs? It adds some custom Javascript/templating to allow turning columns on an off:

screenshot for django-tables2-column-shifter

Upvotes: 2

Related Questions