devtools/livetest.py
brancholdstable
changeset 6665 90f2f20367bc
parent 5907 5eba1248e12b
child 7056 51f88f13d6f3
equal deleted inserted replaced
6018:f4d1d5d9ccbb 6665:90f2f20367bc
    53 
    53 
    54     def locateChild(self, request, segments):
    54     def locateChild(self, request, segments):
    55         """Indicate which resource to use to process down the URL's path"""
    55         """Indicate which resource to use to process down the URL's path"""
    56         if len(segments) and segments[0] == 'data':
    56         if len(segments) and segments[0] == 'data':
    57             # Anything in data/ is treated as static files
    57             # Anything in data/ is treated as static files
    58             datadir = self.config.locate_resource(segments[1])
    58             datadir = self.config.locate_resource(segments[1])[0]
    59             if datadir:
    59             if datadir:
    60                 return static.File(str(datadir), segments[1:])
    60                 return static.File(str(datadir), segments[1:])
    61         # Otherwise we use this single resource
    61         # Otherwise we use this single resource
    62         return self, ()
    62         return self, ()
    63 
    63