It is possible to add a colspan
to a Column
with:
tables.Column(attrs={"td": {"colspan": "4"}})
However, this would make all the rows for that column span 4 cells instead of just the second.
Another solution is to override the table template:
class FavoriteContactTable(FavoriteTable):
template = "path_to_template"
It should extend django_tables2/table.html template and then override the table.tbody.row
block.
Probably the easiest solution is to do it with jQuery/Javascript.
$(document).ready(function() {
$(".table > tbody > tr:nth-child(2) > td:nth-child(column_no)").attr("colspan", "4");
});
I haven't checked the Javascript but it should be something along those lines.