djk2 / django-tables2-column-shifter

Simple extension for django-tables2 can dynamically show or hide columns. Using JQuery, Bootstrap 3, Bootstrap 4, Bootstrap 5 and Django >=1.9
BSD 3-Clause "New" or "Revised" License
21 stars 8 forks source link

how to use a custom html into system? #16

Closed mzramna closed 3 years ago

mzramna commented 4 years ago

there is any way to use an custom html into this? or any way to edit the existing system to acept editions,like enable an add element button

djk2 commented 3 years ago

You can create custom template for shifter. Your custom template should extend my template. for example {% extends "django_tables2_column_shifter/bootstrap4.html" %} If you need, you can override blocks and adjust template to your requires.

After when you create custom template, you should override shifter_template attribute in your Table class.

class YourCustomTable(ColumnShiftTableBootstrap5):
   ...
   shifter_template = "your_custom_template.html"
   ...

You can also extend attribut dropdown_button_css