Add red background if the defender has at least one penalty
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
68da61a33b
commit
58608ea5ff
|
@ -1196,6 +1196,9 @@ class Pool(models.Model):
|
||||||
(f"C{max_row + 1}:{getcol(2 + passages.count() * passage_width)}{max_row + 3}", (0.9, 0.9, 0.9)),
|
(f"C{max_row + 1}:{getcol(2 + passages.count() * passage_width)}{max_row + 3}", (0.9, 0.9, 0.9)),
|
||||||
(f"A{max_row + 5}:E{max_row + 5}", (0.8, 0.8, 0.8)),
|
(f"A{max_row + 5}:E{max_row + 5}", (0.8, 0.8, 0.8)),
|
||||||
(f"A{max_row + 6}:E{max_row + 5 + pool_size}", (0.9, 0.9, 0.9)),]
|
(f"A{max_row + 6}:E{max_row + 5 + pool_size}", (0.9, 0.9, 0.9)),]
|
||||||
|
# Display penalties in red
|
||||||
|
bg_colors += [(f"{getcol(2 + (passage.position - 1) * passage_width + 2)}{max_row + 2}", (1.0, 0.7, 0.7))
|
||||||
|
for passage in self.passages.filter(defender_penalties__gte=1).all()]
|
||||||
for bg_range, bg_color in bg_colors:
|
for bg_range, bg_color in bg_colors:
|
||||||
r, g, b = bg_color
|
r, g, b = bg_color
|
||||||
format_requests.append({
|
format_requests.append({
|
||||||
|
|
Loading…
Reference in New Issue