@classmethod
    def on_change(cls, callback):
        existing = _on_change_callbacks.get(cls, [])
        if callback.__name__ in [e.__name__ for e in existing]:
            return callback

        _on_change_callbacks.setdefault(cls, []).append(callback)
        return callback
Register a function to call on save or update to respond to changes.
dataset/ETHPy150Open mozilla/addons-server/src/olympia/amo/models.py/OnChangeMixin.on_change