carom-server/billard/tables.py

23 lines
668 B
Python
Raw Permalink Normal View History

2019-02-09 21:57:30 +01:00
import django_tables2 as tables
from .models import Location
class LocationTable(tables.Table):
code = tables.TemplateColumn(template_name='billard/tc_location_detail.html')
class Meta:
model = Location
fields = ('code', 'name', 'street', 'plz', 'city')
orderable = False
class LocationAccountingTable(tables.Table):
code = tables.TemplateColumn(template_name='billard/tc_location_detail.html')
accounting = tables.TemplateColumn(template_name='billard/tc_accounting_detail.html')
class Meta:
model = Location
fields = ('code', 'name', 'street', 'plz', 'city', 'accounting')
orderable = False