(self)
return response
Handles dispatching the request to the function using
        Routes
Handles dispatching the request to the function using
        Routes
Handles dispatching the request to the function using Routes
def _dispatch_call(self):
        """Handles dispatching the request to the function using
        Routes"""
        log_debug = self._pylons_log_debug
        req = self._py_object.request
        try:
            action = req.environ['pylons.routes_dict']['action']
        except KeyError:
            raise Exception("No action matched from Routes, unable to"
                            "determine action dispatch.")
        action_method = action.replace('-', '_')
        if log_debug:
            log.debug("Looking for %r method to handle the request",
                      action_method)
        try:
            func = getattr(self, action_method, None)
        except UnicodeEncodeError:
            func = None
        if action_method != 'start_response' and callable(func):
            # Store function used to handle request
            req.environ['pylons.action_method'] = func

            response = self._inspect_call(func)
        else:
            if log_debug:
                log.debug("Couldn't find %r method to handle response", action)
            if pylons.config['debug']:
                raise NotImplementedError('Action %r is not implemented' %
                                          action)
            else:
                response = HTTPNotFound()
        return response
def _dispatch_call ( self ) : log_debug = self . _pylons_log_debug req = self . _py_object . request try : action = req . environ [ 'pylons.routes_dict' ] [ 'action' ] except KeyError : raise Exception ( "No action matched from Routes, unable to" "determine action dispatch." ) action_method = action . replace ( '-' , '_' ) if log_debug : log . debug ( "Looking for %r method to handle the request" , action_method ) try : func = getattr ( self , action_method , None ) except UnicodeEncodeError : func = None if action_method != 'start_response' and callable ( func ) : # Store function used to handle request req . environ [ 'pylons.action_method' ] = func response = self . _inspect_call ( func ) else : if log_debug : log . debug ( "Couldn't find %r method to handle response" , action ) if pylons . config [ 'debug' ] : raise NotImplementedError ( 'Action %r is not implemented' % action ) else : response = HTTPNotFound ( ) return response