1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-18 15:20:19 +02:00

Manage page (no js yet)

This commit is contained in:
Ehouarn
2025-07-18 01:26:30 +02:00
parent ab9abc8520
commit e6839a1079
10 changed files with 559 additions and 32 deletions

View File

@ -2,10 +2,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later
import django_tables2 as tables
from django_tables2 import A
from django.urls import reverse
from .models import Family, Challenge, FamilyMembership
from .models import Family, Challenge, FamilyMembership, Achievement
class FamilyTable(tables.Table):
@ -58,3 +57,17 @@ class FamilyMembershipTable(tables.Table):
template_name = 'django_tables2/bootstrap4.html'
fields = ('user',)
model = FamilyMembership
class AchievementTable(tables.Table):
"""
List recent achievements.
"""
class Meta:
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
model = Achievement
fields = ('family', 'challenge', 'obtained_at', )
template_name = 'django_tables2/bootstrap4.html'
orderable = False