def process_response(self, req, res, resource): logger.info('hellomiddleware processing response...')
def process_request(self, req, res): logger.info('hellomiddleware processing request...')
def on_get(self, req, res, name): logger.info('Saying hello...') test_function(name) res.body = 'Hello, %s' % name logger.info('Said hello!')
def on_get(self, req, res): logger.info('Saying hello as module...') res.body = "Hello! I'm ExampleModule." logger.info('Said hello as module!')
def test_function(name): logger.info('Test function')