Coverage for sample_project/tables.py: 0%
5 statements
« prev ^ index » next coverage.py v7.5.3, created at 2025-10-10 13:36 +0000
« prev ^ index » next coverage.py v7.5.3, created at 2025-10-10 13:36 +0000
1from apis_core.generic.tables import GenericTable, MoreLessColumn
4class PersonTable(GenericTable):
5 class Meta(GenericTable.Meta):
6 sequence = ["desc", "bio"]
8 # example column to show preview and detail
9 bio = MoreLessColumn(
10 orderable=False,
11 preview=lambda x: f"This is {x.surname}",
12 fulltext=lambda x: f"This is {x.surname}, {x.forename} {x.surname}.",
13 )