Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 2061

Show
Ignore:
Timestamp:
10/31/08 09:25:37
Author:
lakin
Message:

#869 - Don't call exposed dispatch objects for the dispatch step

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cpdispatch.py

    r2059 r2061  
    238238            if subnode is None: 
    239239                dispatch = getattr(node, 'dispatch', None) 
    240                 if dispatch and callable(dispatch): 
     240                if dispatch and callable(dispatch) and not \ 
     241                        getattr(dispatch, 'exposed', False): 
    241242                    subnode = dispatch(vpath=iternames) 
    242243            name = iternames.pop(0) 
  • trunk/cherrypy/test/test_dynamicobjectmapping.py

    r2060 r2061  
    224224            self.getPage('/2/2/dispatch') 
    225225            self.assertBody('SubSubRoot dispatch') 
     226 
     227            # The exposed dispatch will not be called as a dispatch 
     228            # method. 
     229            self.getPage('/2/2/foo/foo') 
     230            self.assertBody("SubSubRoot default") 
    226231 
    227232            # Dynamic dispatch will fail here for the subsubnodes 

Hosted by WebFaction

Log in as guest/cpguest to create tickets