khufu.tables.sortable_table module

A sortable, customisable HTML table

Author

David Young

class sortable_table(log, dbConn=False, currentPageUrl='', columnsToDisplay=[], defaultSort=False, tableRowsDictionary={})[source]

Bases: object

The worker class for the sortable_table module

Key Arguments

  • dbConn – mysql database connection

  • log – logger

  • currentPageUrl – the baseurl for the webpage

  • columnsToDisplay – a list of column objects for the table

  • defaultSort – the column to sort on by default

  • tableRowsDictionary – dictionary of column names and values (e.g. a mysql query result)

close()[source]
get()[source]

get the sortable_table object

Return

  • sortable_table

get_table_head()[source]

get table head

Return

  • tableHead – the table head

get_table_body()[source]

get table body

Return

  • tableBody