How to use the emmett.orm.helpers.Callback function in emmett

To help you get started, we’ve selected a few emmett examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def before_delete(f):
    return Callback(f, '_before_delete')
github emmett-framework / emmett / emmett / orm / helpers.py View on Github external
def __init__(self, f, t):
        self.t = []
        if isinstance(f, Callback):
            self.t += f.t
            f = f.f
        self.f = f
        self.t.append(t)
        self._inst_count_ = Callback._inst_count_
        Callback._inst_count_ += 1
github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def after_delete(f):
    return Callback(f, '_after_delete')
github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def before_update(f):
    return Callback(f, '_before_update')
github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def after_update(f):
    return Callback(f, '_after_update')
github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def after_insert(f):
    return Callback(f, '_after_insert')
github emmett-framework / emmett / emmett / orm / apis.py View on Github external
def before_insert(f):
    return Callback(f, '_before_insert')
github emmett-framework / emmett / emmett / orm / helpers.py View on Github external
def __init__(self, f, t):
        self.t = []
        if isinstance(f, Callback):
            self.t += f.t
            f = f.f
        self.f = f
        self.t.append(t)
        self._inst_count_ = Callback._inst_count_
        Callback._inst_count_ += 1