#NEWLINE# def get_data( self , datum ) : #NEWLINE# #INDENT# 'Returns the final display data for this column from the given\n        inputs.\n\n        The return value will be either the attribute specified for this column\n        or the return value of the attr:`~horizon.tables.Column.transform`\n        method for this column.\n        ' #NEWLINE# datum_id = self . table . get_object_id ( datum ) #NEWLINE# if ( datum_id in self . table . _data_cache [ self ] ) : #NEWLINE# #INDENT# return self . table . _data_cache [ self ] [ msg ] #NEWLINE# #UNINDENT# data = self . get_raw_data ( datum ) #NEWLINE# display_value = None #NEWLINE# if self . display_choices : #NEWLINE# #INDENT# display_value = [ display for ( value , display ) in self . display_choices if ( value . lower ( ) == ( data or '' ) . lower ( ) ) ] #NEWLINE# #UNINDENT# if display_value : #NEWLINE# #INDENT# data = display_value [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# for filter_func in self . filters : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# data = filter_func ( data ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# msg = "Filter '%(filter)s' failed with data '%(data)s' on column '%(col_name)s'" #NEWLINE# LOG . warning ( msg , { #NEWLINE# #INDENT# 'filter' : filter_func . func_name , #NEWLINE# 'data' : data , #NEWLINE# 'col_name' : unicode ( self . verbose_name ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( data and self . truncate ) : #NEWLINE# #INDENT# data = truncatechars ( data , self . truncate ) #NEWLINE# #UNINDENT# self . table . _data_cache [ self ] [ datum_id ] = data #NEWLINE# return self . table . _data_cache [ self ] [ datum_id ]