Table of Contents

Class: INamespaceHandler ./src/peak/web/interfaces.py

A function returning a new context for a given context/ns/name

Base Classes   
Interface
Methods   
__call__
  __call__ 
__call__ (
        ctx,
        ob,
        namespace,
        name,
        qname,
        default=NOT_GIVEN,
        )

Return a new context relative to ctx for namespace and name

qname is the original URL path component that was being traversed. ctx is an ITraversalContext, and ob is the target object (which may not be the same as ctx.current, if the handler is being reused as part of another handler). namespace is the namespace identifier of qname, and name is the remainder of qname.

The handler must return an appropriate new ITraversalContext, or raise an appropriate error. If a default other than NOT_GIVEN is supplied, the handler should return the default instead of raising NotFound when the target cannot be located. Note: the handler must not wrap default in a traversal context: checking for the returned default is the caller's responsibility.


Table of Contents

This document was automatically generated on Mon Oct 14 01:11:12 2019 by HappyDoc version 2.1