I'm new to django and stumbling through creating my first site. I'm using django-tables2 to display a table and it appears to be working (the table shows up, it's sortable).
Except I can't seem to customize anything. Exclude, field and sequence don't work. Can't change column verbose names.
TABLE:
import django_tables2 as tables
from sl_overview.models import DailyslSumm
class slsummTable(tables.Table):
class Meta:
model = DailyslSumm
exclude = ('index')
VIEW:
class sl_summ(SingleTableView):
model = DailyslSumm
context_object_name = 'slsummdb'
table_class = slsummTable
TEMPLATE:
{% load render_table from django_tables2 %}
{% render_table slsummdb %}
The exclude in the code above doesn't work. The column is still there. Using field doesn't adjust columns either. I'm sure I'm missing something simple, thanks for any help.