mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-29 20:02:59 +00:00
14 lines
437 B
Python
14 lines
437 B
Python
|
#!/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 }
|