#NEWLINE# def get_record_data( self , obj ) : #NEWLINE# #INDENT# "\n        Returns a dict of column data that will be given to the view for final serialization.  The\n        key names in this dict are not finalized at this stage, but all of the data is present.\n\n        Each column is consulted for its value (computed based on its\n        :py:attr:`~datatableview.columns.Column.sources` applied against the given ``obj`` instance)\n        and then sent to the column's :py:attr:`~datatableview.columns.Column.processor` function.\n        " #NEWLINE# preloaded_kwargs = self . preload_record_data ( obj ) #NEWLINE# data = { #NEWLINE# #INDENT# 'pk' : self . get_object_pk ( obj ) , #NEWLINE# '_extra_data' : self . get_extra_record_data ( obj ) , #NEWLINE# #UNINDENT# } #NEWLINE# for ( i , ( name , column ) ) in enumerate ( self . columns . items ( ) ) : #NEWLINE# #INDENT# kwargs = dict ( column . get_processor_kwargs ( ** preloaded_kwargs ) , ** { #NEWLINE# #INDENT# 'datatable' : self , #NEWLINE# 'view' : self . view , #NEWLINE# 'field_name' : column . name , #NEWLINE# #UNINDENT# } ) #NEWLINE# value = self . get_column_value ( obj , column , ** kwargs ) #NEWLINE# processor = self . get_processor_method ( column , i ) #NEWLINE# if processor : #NEWLINE# #INDENT# value = processor ( obj , default_value = value [ 0 ] , rich_value = value [ 1 ] , ** kwargs ) #NEWLINE# #UNINDENT# if isinstance ( value , ( tuple , list ) ) : #NEWLINE# #INDENT# value = value [ 1 ] #NEWLINE# #UNINDENT# if ( six . PY2 and isinstance ( value , str ) ) : #NEWLINE# #INDENT# value = value . decode ( 'utf-8' ) #NEWLINE# #UNINDENT# data [ str ( i ) ] = six . text_type ( value ) #NEWLINE# #UNINDENT# return data