def process(self, instance, force=False):
        """Processing is triggered by field's pre_save method. It will be
        executed if field's value has been changed (known through descriptor and
        stashing logic) or if model instance has never been saved before,
        i.e. no pk set, because there is a chance that field was initialized
        through model's `__init__`, hence default value was stashed with
        pre_init handler.

        """
        if self.should_process and (force or self.has_stashed_value):
            self.set_status(instance, {'state': 'busy'})
            for d in filter(lambda d: d.has_processor(), self.dependencies):
                d.stash_previous_value(instance, d.get_value(instance))
            try:
                if self.has_async:
                    for d in filter(lambda d: not d.async and d.should_process(),
                                    self.dependencies):
                        self._process(d, instance)
                    async_handler = AsyncHandler(self, instance)
                    async_handler.start()
                else:
                    for d in filter(lambda d: d.should_process(), self.dependencies):
                        self._process(d, instance)
                    self.finished_processing(instance)
            except BaseException as e:
                self.failed_processing(instance, e)
                if not isinstance(e, ProcessingError):
                    raise
        elif self.has_stashed_value:
            self.cleanup_stash()
def process ( self , instance , force = False ) : if self . should_process and ( force or self . has_stashed_value ) : self . set_status ( instance , { 'state' : 'busy' } ) for d in filter ( lambda d : d . has_processor ( ) , self . dependencies ) : d . stash_previous_value ( instance , d . get_value ( instance ) ) try : if self . has_async : for d in filter ( lambda d : not d . async and d . should_process ( ) , self . dependencies ) : self . _process ( d , instance ) async_handler = AsyncHandler ( self , instance ) async_handler . start ( ) else : for d in filter ( lambda d : d . should_process ( ) , self . dependencies ) : self . _process ( d , instance ) self . finished_processing ( instance ) except BaseException as e : self . failed_processing ( instance , e ) if not isinstance ( e , ProcessingError ) : raise elif self . has_stashed_value : self . cleanup_stash ( )
Processing is triggered by field's pre_save method. It will be
        executed if field's value has been changed (known through descriptor and
        stashing logic) or if model instance has never been saved before,
        i.e. no pk set, because there is a chance that field was initialized
        through model's `__init__`, hence default value was stashed with
        pre_init handler.