row color to show if display
This commit is contained in:
parent
b3c1032f4f
commit
20ea017e96
2 changed files with 3 additions and 3 deletions
|
|
@ -87,10 +87,10 @@ class ButtonTable(tables.Table):
|
|||
class Meta:
|
||||
attrs = {
|
||||
'class':
|
||||
'table table-bordered condensed table-striped table-hover'
|
||||
'table table-bordered condensed table-hover'
|
||||
}
|
||||
row_attrs = {
|
||||
'class': 'table-row',
|
||||
'class': lambda record: 'table-row ' + 'table-success' if record.display else 'table-danger',
|
||||
'id': lambda record: "row-"+str(record.pk),
|
||||
'data-href': lambda record: record.pk
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue