1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 23:44:03 +02:00

Update calendar

This commit is contained in:
Yohann D'ANELLO
2020-10-20 14:21:16 +02:00
parent 2d467ef3af
commit 42e1abd9aa
7 changed files with 94 additions and 43 deletions

View File

@ -12,12 +12,14 @@ class CalendarTable(tables.Table):
}
row_attrs = {
'class': lambda record: 'bg-success' if timezone.now() > record.end else
'bg-waring' if timezone.now() > record.start else
'bg-danger'
'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',)
# noinspection PyTypeChecker