Python cherrypy.dispatch() Examples

The following are 5 code examples of cherrypy.dispatch(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module cherrypy , or try the search function .
Example #1
Source File: _cprequest.py    From cherrypy with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def get_resource(self, path):
        """Call a dispatcher (which sets self.handler and .config). (Core)"""
        # First, see if there is a custom dispatch at this URI. Custom
        # dispatchers can only be specified in app.config, not in _cp_config
        # (since custom dispatchers may not even have an app.root).
        dispatch = self.app.find_config(
            path, 'request.dispatch', self.dispatch)

        # dispatch() should set self.handler and self.config
        dispatch(path) 
Example #2
Source File: _cprequest.py    From opsbro with MIT License 5 votes vote down vote up
def get_resource(self, path):
        """Call a dispatcher (which sets self.handler and .config). (Core)"""
        # First, see if there is a custom dispatch at this URI. Custom
        # dispatchers can only be specified in app.config, not in _cp_config
        # (since custom dispatchers may not even have an app.root).
        dispatch = self.app.find_config(
            path, "request.dispatch", self.dispatch)

        # dispatch() should set self.handler and self.config
        dispatch(path) 
Example #3
Source File: _cprequest.py    From bazarr with GNU General Public License v3.0 5 votes vote down vote up
def get_resource(self, path):
        """Call a dispatcher (which sets self.handler and .config). (Core)"""
        # First, see if there is a custom dispatch at this URI. Custom
        # dispatchers can only be specified in app.config, not in _cp_config
        # (since custom dispatchers may not even have an app.root).
        dispatch = self.app.find_config(
            path, 'request.dispatch', self.dispatch)

        # dispatch() should set self.handler and self.config
        dispatch(path) 
Example #4
Source File: _cprequest.py    From Tautulli with GNU General Public License v3.0 5 votes vote down vote up
def get_resource(self, path):
        """Call a dispatcher (which sets self.handler and .config). (Core)"""
        # First, see if there is a custom dispatch at this URI. Custom
        # dispatchers can only be specified in app.config, not in _cp_config
        # (since custom dispatchers may not even have an app.root).
        dispatch = self.app.find_config(
            path, 'request.dispatch', self.dispatch)

        # dispatch() should set self.handler and self.config
        dispatch(path) 
Example #5
Source File: _cprequest.py    From moviegrabber with GNU General Public License v3.0 5 votes vote down vote up
def get_resource(self, path):
        """Call a dispatcher (which sets self.handler and .config). (Core)"""
        # First, see if there is a custom dispatch at this URI. Custom
        # dispatchers can only be specified in app.config, not in _cp_config
        # (since custom dispatchers may not even have an app.root).
        dispatch = self.app.find_config(path, "request.dispatch", self.dispatch)
        
        # dispatch() should set self.handler and self.config
        dispatch(path)