(self, item, default_value=None, include_empty=None)
Return the fields to export as an iterable of tuples
        (name, serialized_value)
Return the fields to export as an iterable of tuples
        (name, serialized_value)
Return the fields to export as an iterable of tuples ( name serialized_value )
def _get_serialized_fields(self, item, default_value=None, include_empty=None):
        """Return the fields to export as an iterable of tuples
        (name, serialized_value)
        """
        item = ItemAdapter(item)

        if include_empty is None:
            include_empty = self.export_empty_fields

        if self.fields_to_export is None:
            if include_empty:
                field_iter = item.field_names()
            else:
                field_iter = item.keys()
        else:
            if include_empty:
                field_iter = self.fields_to_export
            else:
                field_iter = (x for x in self.fields_to_export if x in item)

        for field_name in field_iter:
            if field_name in item:
                field_meta = item.get_field_meta(field_name)
                value = self.serialize_field(field_meta, field_name, item[field_name])
            else:
                value = default_value

            yield field_name, value
def _get_serialized_fields ( self , item , default_value = None , include_empty = None ) : item = ItemAdapter ( item ) if include_empty is None : include_empty = self . export_empty_fields if self . fields_to_export is None : if include_empty : field_iter = item . field_names ( ) else : field_iter = item . keys ( ) else : if include_empty : field_iter = self . fields_to_export else : field_iter = ( x for x in self . fields_to_export if x in item ) for field_name in field_iter : if field_name in item : field_meta = item . get_field_meta ( field_name ) value = self . serialize_field ( field_meta , field_name , item [ field_name ] ) else : value = default_value yield field_name , value