milla.dispatch.traversal¶
URL Dispatching
| Created: | Mar 26, 2011 |
|---|---|
| Author: | dustin |
| Updated: | $Date$ |
| Updater: | $Author$ |
-
class
milla.dispatch.traversal.Traverser(root)[source]¶ Default URL dispatcher
Parameters: root – The root object at which lookup will begin The default URL dispatcher uses object attribute traversal to locate a handler for a given path. For example, consider the following class:
class Root(object): def foo(self): return 'Hello, world!'
The path
/foowould resolve to thefoomethod of theRootclass.If a path cannot be resolved,
UnresolvedPathwill be raised.