mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-12-23 07:52:23 +00:00
Club list is now clickable
This commit is contained in:
parent
70c5bc06f3
commit
10f7ef4045
14
apps/member/tables.py
Normal file
14
apps/member/tables.py
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import django_tables2 as tables
|
||||
from .models import Club
|
||||
|
||||
|
||||
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')
|
||||
row_attrs = {'class':'table-row',
|
||||
'data-href': lambda record: record.pk }
|
Loading…
Reference in New Issue
Block a user