def test_column_params_should_be_preserved_under_inheritance():
 class MyTableA(MyTable, ):
  u'\n        having an empty `class Meta` should not undo the explicit definition\n        of column item1 in MyTable.\n        '
  class Meta(MyTable.Meta, ):
   pass
 class MyTableB(MyTable, ):
  u'\n        having a non-empty `class Meta` should not undo the explicit definition\n        of column item1 in MyTable.\n        '
  class Meta(MyTable.Meta, ):
   per_page = 22
 table = MyTable(MyModel.objects.all())
 tableA = MyTableA(MyModel.objects.all())
 tableB = MyTableB(MyModel.objects.all())
 assert (table.columns[u'item1'].verbose_name == u'Nice column name')
 assert (tableA.columns[u'item1'].verbose_name == u'Nice column name')
 assert (tableB.columns[u'item1'].verbose_name == u'Nice column name')

def test_column_params_should_be_preserved_under_inheritance ( ) : class MyTableA ( MyTable , ) : class Meta ( MyTable . Meta , ) : pass class MyTableB ( MyTable , ) : class Meta ( MyTable . Meta , ) : per_page = 22 table = MyTable ( MyModel . objects . all ( ) ) tableA = MyTableA ( MyModel . objects . all ( ) ) tableB = MyTableB ( MyModel . objects . all ( ) ) assert ( table . columns [ u'item1' ] . verbose_name == u'Nice column name' ) assert ( tableA . columns [ u'item1' ] . verbose_name == u'Nice column name' ) assert ( tableB . columns [ u'item1' ] . verbose_name == u'Nice column name' )
github issue #337 columns explicitly defined on mytable get overridden by columns implicitly defined on its child .