I have a table that populates on using django_tables2, with two columns:
tables.py
class SummaryTable(tables.Table):
update = CheckBoxColumnWithName(verbose_name = "Select",accessor="pk",
orderable=False)
class Meta:
model = Vehicle
fields = ('update', 'vehid')
# Add class="paleblue" to <table> tag
attrs = {'class':'paleblue'}
Columns update and vehid.
What I need is to restrict the user to only select one checkbox, if they select another checkbox, it unselects the first and selects the new choice.
Can anyone advise how to do this?
Aucun commentaire:
Enregistrer un commentaire