mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-07-20 16:09:12 +02:00
Family views
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user