Package cherrypy :: Module _cptree :: Class Tree
[hide private]
[frames] | no frames]

Class Tree

source code

object --+
         |
        Tree

A registry of CherryPy applications, mounted at diverse points.

An instance of this class may also be used as a WSGI callable (WSGI application object), in which case it dispatches to all mounted apps.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
mount(self, root, script_name='', config=None)
Mount a new app from a root object, script_name, and config.
source code
 
graft(self, wsgi_callable, script_name='')
Mount a wsgi callable at the given script_name.
source code
 
script_name(self, path=None)
The script_name of the app at the given path, or None.
source code
 
__call__(self, environ, start_response) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  apps = {}
  apps__doc = '\n A dict of the form {script name: applicatio...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

script_name(self, path=None)

source code 

The script_name of the app at the given path, or None.

If path is None, cherrypy.request is used.

Class Variable Details [hide private]

apps__doc

Value:
'''
    A dict of the form {script name: application}, where "script name"
    is a string declaring the URI mount point (no trailing slash), and
    "application" is an instance of cherrypy.Application (or an arbitr\
ary
    WSGI callable if you happen to be using a WSGI server).'''