include
¶
The include
configuration is used to include or exclude parts programmatically. Let’s start with a simple example of a table:
table = Table(
auto__model=Album,
)
▼ Hide result
We could make the name
column only visible for staff users:
table = Table(
auto__model=Album,
columns__name__include=lambda user, **_: user.is_staff,
)
▼ Hide result