1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-08-05 03:03:44 +02:00

Drop a lot of Corres2math content

This commit is contained in:
Yohann D'ANELLO
2020-12-28 18:52:50 +01:00
parent f5ec9d1054
commit 7ef602c6cd
28 changed files with 63 additions and 1286 deletions

View File

@@ -1,28 +1,10 @@
# Copyright (C) 2020 by Animath
# SPDX-License-Identifier: GPL-3.0-or-later
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
import django_tables2 as tables
from .models import Phase, Team
class CalendarTable(tables.Table):
class Meta:
attrs = {
'class': 'table table condensed table-striped',
}
row_attrs = {
'class': lambda record: 'bg-success' if timezone.now() > record.end else
'bg-warning' if timezone.now() > record.start else
'bg-danger',
'data-id': lambda record: str(record.phase_number),
}
model = Phase
fields = ('phase_number', 'description', 'start', 'end',)
template_name = 'django_tables2/bootstrap4.html'
order_by = ('phase_number',)
from .models import Team
# noinspection PyTypeChecker