def _route(self, action, method):
<EOL>path = method._wsgi_path<EOL>methods = None<EOL>if path is None:<EOL><INDENT>map_rule = self.wsgi_method_map.get(method.__name__)<EOL>if map_rule is None:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>" % (method.__name__, self.wsgi_name))<EOL>return<EOL><DEDENT>path = utils.norm_path(map_rule[<NUM_LIT:0>] % self.wsgi_name)<EOL>methods = map_rule[<NUM_LIT:1>]<EOL><DEDENT>name = '<STR_LIT>' % (self.wsgi_name, action)<EOL>path = getattr(self, '<STR_LIT>', '<STR_LIT>') + path<EOL>conditions = {}<EOL>if hasattr(method, '<STR_LIT>'):<EOL><INDENT>conditions['<STR_LIT>'] = methods if methods else method._wsgi_methods<EOL><DEDENT>if hasattr(method, '<STR_LIT>'):<EOL><INDENT>conditions['<STR_LIT>'] = method._wsgi_condition<EOL><DEDENT>self.wsgi_mapper.connect(name, path,<EOL>controller=self,<EOL>action=action,<EOL>conditions=conditions,<EOL>**getattr(method, '<STR_LIT>', {}))<EOL>
Given an action method, generates a route for it.