

def __init__(self):
    cls = self.__class__
    self._data = {
        
    }
    self._callbacks = {
        
    }
    self._events = {
        
    }
    self._request_uri = None
    self._json_uri = None
    self._request_args = None

    def invalid_request(obj_response, func_name):
        'Handler to be called when an unknown function is called.'
        msg = 'The action you performed is unavailable! (Sijax error)'
        obj_response.alert(msg)

    def invalid_call(obj_response, callback):
        'Handler to be called when a function is called the wrong way.'
        msg = 'You tried to perform an action in a wrong way! (Sijax error)'
        obj_response.alert(msg)
    self.register_event(cls.EVENT_BEFORE_PROCESSING, (lambda r: r))
    self.register_event(cls.EVENT_AFTER_PROCESSING, (lambda r: r))
    self.register_event(cls.EVENT_INVALID_REQUEST, invalid_request)
    self.register_event(cls.EVENT_INVALID_CALL, invalid_call)

dataset/ETHPy150Open spantaleev/sijax-python/sijax/core.py Sijax.__init__/original