def get_data(self, datum, column, row):
        """Fetches the data to be displayed in this cell."""
        table = row.table
        if column.auto == "multi_select":
            data = ""
            if row.can_be_selected(datum):
                widget = ThemableCheckboxInput(check_test=lambda value: False)
                # Convert value to string to avoid accidental type conversion
                data = widget.render('object_ids',
                                     six.text_type(table.get_object_id(datum)),
                                     {'class': 'table-row-multi-select'})
            table._data_cache[column][table.get_object_id(datum)] = data
        elif column.auto == "form_field":
            widget = column.form_field
            if issubclass(widget.__class__, forms.Field):
                widget = widget.widget

            widget_name = "%s__%s" % \
                (column.name,
                 six.text_type(table.get_object_id(datum)))

            # Create local copy of attributes, so it don't change column
            # class form_field_attributes
            form_field_attributes = {}
            form_field_attributes.update(column.form_field_attributes)
            # Adding id of the input so it pairs with label correctly
            form_field_attributes['id'] = widget_name

            if (template.defaultfilters.urlize in column.filters or
                    template.defaultfilters.yesno in column.filters):
                data = widget.render(widget_name,
                                     column.get_raw_data(datum),
                                     form_field_attributes)
            else:
                data = widget.render(widget_name,
                                     column.get_data(datum),
                                     form_field_attributes)
            table._data_cache[column][table.get_object_id(datum)] = data
        elif column.auto == "actions":
            data = table.render_row_actions(datum)
            table._data_cache[column][table.get_object_id(datum)] = data
        else:
            data = column.get_data(datum)
            if column.cell_attributes_getter:
                cell_attributes = column.cell_attributes_getter(data) or {}
                self.attrs.update(cell_attributes)
        return data
def get_data ( self , datum , column , row ) : table = row . table if column . auto == "multi_select" : data = "" if row . can_be_selected ( datum ) : widget = ThemableCheckboxInput ( check_test = lambda value : False ) data = widget . render ( 'object_ids' , six . text_type ( table . get_object_id ( datum ) ) , { 'class' : 'table-row-multi-select' } ) table . _data_cache [ column ] [ table . get_object_id ( datum ) ] = data elif column . auto == "form_field" : widget = column . form_field if issubclass ( widget . __class__ , forms . Field ) : widget = widget . widget widget_name = "%s__%s" % ( column . name , six . text_type ( table . get_object_id ( datum ) ) ) form_field_attributes = { } form_field_attributes . update ( column . form_field_attributes ) form_field_attributes [ 'id' ] = widget_name if ( template . defaultfilters . urlize in column . filters or template . defaultfilters . yesno in column . filters ) : data = widget . render ( widget_name , column . get_raw_data ( datum ) , form_field_attributes ) else : data = widget . render ( widget_name , column . get_data ( datum ) , form_field_attributes ) table . _data_cache [ column ] [ table . get_object_id ( datum ) ] = data elif column . auto == "actions" : data = table . render_row_actions ( datum ) table . _data_cache [ column ] [ table . get_object_id ( datum ) ] = data else : data = column . get_data ( datum ) if column . cell_attributes_getter : cell_attributes = column . cell_attributes_getter ( data ) or { } self . attrs . update ( cell_attributes ) return data
Fetches the data to be displayed in this cell.