Changeset 2059
- Timestamp:
- 10/30/08 18:35:26
- Files:
-
- trunk/cherrypy/_cpdispatch.py (modified) (1 diff)
- trunk/cherrypy/test/test.py (modified) (1 diff)
- trunk/cherrypy/test/test_dynamicobjectmapping.py (copied) (copied from branches/dynamicnodedispatch-869/cherrypy/test/test_dynamicobjectmapping.py)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpdispatch.py
r2030 r2059 228 228 node = root 229 229 names = [x for x in path.strip('/').split('/') if x] + ['index'] 230 for name in names: 230 iternames = names[:] 231 while iternames: 232 name = iternames[0] 231 233 # map to legal Python identifiers (replace '.' with '_') 232 234 objname = name.replace('.', '_') 233 235 234 236 nodeconf = {} 235 node = getattr(node, objname, None) 237 subnode = getattr(node, objname, None) 238 if subnode is None: 239 dispatch = getattr(node, 'dispatch', None) 240 if dispatch and callable(dispatch): 241 subnode = dispatch(vpath=iternames) 242 name = iternames.pop(0) 243 node = subnode 244 236 245 if node is not None: 237 246 # Get _cp_config attached to this node. trunk/cherrypy/test/test.py
r2018 r2059 383 383 'test_logging', 384 384 'test_objectmapping', 385 'test_dynamicobjectmapping', 385 386 'test_misc_tools', 386 387 'test_static',

