def __init__(self, headings): """ Constuct a list header. """ super(ListHeader, self).__init__() self.append_class(self.LIST_HEADER_CLASS) self.append_class(HEADED_LIST_ITEM_CLASS) for h in headings: col_head = Div() col_head.set_text(h) col_head.append_class(LIST_COLUMN_CLASS) self.append_child(col_head)