bradleyayers/django-tables2 — pull request #183 by mbertheau (2014-01-31 17:11:12+00:00)
Title: Inherited Meta.fields overwrites custom column in base class

In the following situation:
```
class BaseTable(tables.Table):
title = tables.LinkColumn('dashboard:catalogue-product', args=[tables.A('pk')])
date_updated = tables.DateColumn(verbose_name=_("Last modified"))

class Meta:
fields = ('title',)
model = Product
sequence = ('title', 'date_updated')

class ProductTable(BaseTable):
class Meta(BaseTable.Meta):
pass
```

ProductTable gets the generic `Column` for `Model.title` instead of the `LinkColumn`. The reason is that `ProductTable` inherits `Meta.fields` which pulls in the generic column and overwrites `BaseTable`'s `title` column.

I'm really using `Meta.fields` here to exclude all the other columns of the `Product` model. I could use `Meta.exclude`, however that would then pull in all generic model columns, still overwriting the custom column for title – `Meta.exclude` will then just remove the other columns again.

A possible fix is to make it such that `Meta.fields = ()'` means don't use any generic model columns. You could argue to just don't set `Meta.model` in that case, however in a different class hierarchy the base table might want to use generic model columns. You'd have to unset both `Meta.fields` and `Meta.model` in the derived `Meta` class, which seems like bad API.

I'll attach a pull request to this effect after I have tested that this works in the situations I need.

I'm moving https://github.com/tangentlabs/django-oscar to django-tables2, which is why customisability is my primary goal.