From d55671efd1af1e8eadce71e9406f81038801b537 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 1 Jan 2021 15:54:50 +0100 Subject: [PATCH] Use warning background for teams that didn't sent their video --- apps/participation/tables.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/participation/tables.py b/apps/participation/tables.py index cfd121f..b8f3a93 100644 --- a/apps/participation/tables.py +++ b/apps/participation/tables.py @@ -42,6 +42,9 @@ class TeamTable(tables.Table): attrs = { 'class': 'table table condensed table-striped', } + row_attrs = { + 'class': lambda record: '' if record.participation.solution.link else 'bg-warning', + } model = Team fields = ('name', 'trigram', 'problem',) template_name = 'django_tables2/bootstrap4.html'