1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-07-20 16:09:12 +02:00

Family views

This commit is contained in:
Ehouarn
2025-07-17 17:07:47 +02:00
parent 3ebadf34bc
commit 65dd42fc97
7 changed files with 227 additions and 8 deletions

View File

@ -4,7 +4,7 @@
import django_tables2 as tables
from django_tables2 import A
from .models import Family, Challenge
from .models import Family, Challenge, FamilyMembership
class FamilyTable(tables.Table):
@ -43,3 +43,17 @@ class ChallengeTable(tables.Table):
model = Challenge
template_name = 'django_tables2/bootstrap4.html'
fields = ('name', 'description', 'points',)
class FamilyMembershipTable(tables.Table):
"""
List all family memberships.
"""
class Meta:
attrs = {
'class': 'table table-condensed table-striped',
'style': 'table-layout: fixed;'
}
template_name = 'django_tables2/bootstrap4.html'
fields = ('user',)
model = FamilyMembership