1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Distinguish new and old members

This commit is contained in:
Yohann D'ANELLO
2020-04-17 00:48:54 +02:00
parent 080510bcf2
commit 96ad5385b0
6 changed files with 51 additions and 22 deletions

View File

@ -71,16 +71,13 @@ class WEIRegistrationTable(tables.Table):
},
)
def render_is_first_year(self, value):
return _("yes") if value else _("no")
class Meta:
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
model = WEIRegistration
template_name = 'django_tables2/bootstrap4.html'
fields = ('user', 'is_first_year',)
fields = ('user', 'first_year',)
row_attrs = {
'class': 'table-row',
'id': lambda record: "row-" + str(record.pk),