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

[member] add user list and filter

This commit is contained in:
Pierre-antoine Comby
2019-09-23 12:50:14 +02:00
parent 55d984435d
commit 07d1cd225b
6 changed files with 105 additions and 2 deletions

View File

@ -2,12 +2,26 @@
import django_tables2 as tables
from .models import Club
from django.conf import settings
from django.contrib.auth.models import User
class ClubTable(tables.Table):
class Meta:
attrs = {'class':'table table-bordered table-condensed table-striped table-hover'}
model = Club
template_name = 'django_tables2/bootstrap.html'
fields= ('id','name','email')
fields = ('id','name','email')
row_attrs = {'class':'table-row',
'data-href': lambda record: record.pk }
class UserTable(tables.Table):
section = tables.Column(accessor='profile.section')
solde = tables.Column(accessor='note.balance')
class Meta:
attrs = {'class':'table table-bordered table-condensed table-striped table-hover'}
template_name = 'django_tables2/bootstrap.html'
fields = ('last_name','first_name','username','email')
model = User