parameters: (k, v)
docstring: Attach bare hooks declared in config.
docstring_summary: Attach bare hooks declared in config.
docstring_tokens: Attach bare hooks declared in config .
function: def hooks_namespace(k, v):
      """Attach bare hooks declared in config."""
      # Use split again to allow multiple hooks for a single
      # hookpoint per path (e.g. "hooks.before_handler.1").
      # Little-known fact you only get from reading source ;)
      hookpoint = k.split(".", 1)[0]
      if isinstance(v, basestring):
          v = cherrypy.lib.attributes(v)
      if not isinstance(v, Hook):
          v = Hook(v)
      cherrypy.serving.request.hooks[hookpoint].append(v)
function_tokens: def hooks_namespace ( k , v ) : # Use split again to allow multiple hooks for a single # hookpoint per path (e.g. "hooks.before_handler.1"). # Little-known fact you only get from reading source ;) hookpoint = k . split ( "." , 1 ) [ 0 ] if isinstance ( v , basestring ) : v = cherrypy . lib . attributes ( v ) if not isinstance ( v , Hook ) : v = Hook ( v ) cherrypy . serving . request . hooks [ hookpoint ] . append ( v )