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