def test_exclude_should_work_on_sequence_too():
 class PersonTable(tables.Table, ):
  first_name = tables.Column()
  last_name = tables.Column()
  occupation = tables.Column()
  class Meta:
   sequence = (u'first_name', u'last_name', u'occupation')
 class AnotherPersonTable(PersonTable, ):
  class Meta(PersonTable.Meta, ):
   exclude = (u'first_name', u'last_name')
 tableA = PersonTable([])
 assert (tableA.columns.names() == [u'first_name', u'last_name', u'occupation'])
 tableB = AnotherPersonTable([])
 assert (tableB.columns.names() == [u'occupation'])
 tableC = PersonTable([], exclude=u'first_name')
 assert (tableC.columns.names() == [u'last_name', u'occupation'])

def test_exclude_should_work_on_sequence_too ( ) : class PersonTable ( tables . Table , ) : first_name = tables . Column ( ) last_name = tables . Column ( ) occupation = tables . Column ( ) class Meta : sequence = ( u'first_name' , u'last_name' , u'occupation' ) class AnotherPersonTable ( PersonTable , ) : class Meta ( PersonTable . Meta , ) : exclude = ( u'first_name' , u'last_name' ) tableA = PersonTable ( [ ] ) assert ( tableA . columns . names ( ) == [ u'first_name' , u'last_name' , u'occupation' ] ) tableB = AnotherPersonTable ( [ ] ) assert ( tableB . columns . names ( ) == [ u'occupation' ] ) tableC = PersonTable ( [ ] , exclude = u'first_name' ) assert ( tableC . columns . names ( ) == [ u'last_name' , u'occupation' ] )
it should be possible to define a sequence on a table and exclude it in a child of that table .