(self, instance)
return data
Take a model instance, and turn it into a dict that can be serialized
        based on the fields defined on this DocType subclass
Take a model instance, and turn it into a dict that can be serialized
        based on the fields defined on this DocType subclass
Take a model instance and turn it into a dict that can be serialized based on the fields defined on this DocType subclass
def prepare(self, instance):
        """
        Take a model instance, and turn it into a dict that can be serialized
        based on the fields defined on this DocType subclass
        """
        data = {
            name: prep_func(instance)
            for name, field, prep_func in self._prepared_fields
        }
        return data
def prepare ( self , instance ) : data = { name : prep_func ( instance ) for name , field , prep_func in self . _prepared_fields } return data