def items(self):
        """Get all list items"""
        query = self.get_queryset()
        fields = self.get_model_config().get_list_fields()

        for item in query.iterator():
            row = OrderedDict()
            for field_name in self.get_current_fields():
                field = fields.get(field_name)
                if not field_name:
                    row[field_name] = ''

                if hasattr(item, field['field']):
                    row[field_name] = getattr(item, field['field'])
                else:
                    row[field_name] = ''  # TODO Maybe render field ans strip html?
            yield row
def items ( self ) : query = self . get_queryset ( ) fields = self . get_model_config ( ) . get_list_fields ( ) for item in query . iterator ( ) : row = OrderedDict ( ) for field_name in self . get_current_fields ( ) : field = fields . get ( field_name ) if not field_name : row [ field_name ] = '' if hasattr ( item , field [ 'field' ] ) : row [ field_name ] = getattr ( item , field [ 'field' ] ) else : row [ field_name ] = '' yield row
Get all list items