Changeset 62
- Timestamp:
- 07/26/07 12:03:57 (1 year ago)
- Files:
-
- projects/Twisted-Goodies/trunk/misc/var_www_foss.tellectual.com_index.py (modified) (2 diffs)
- projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/resources/test (added)
- projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/resources/test/__init__.py (added)
- projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/test (added)
- projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/http/test/__init__.py (added)
- projects/Twisted-Goodies/trunk/twisted_goodies/simpleserver/test/__init__.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
projects/Twisted-Goodies/trunk/misc/var_www_foss.tellectual.com_index.py
r59 r62 93 93 self.apiDocResource = APIDocResource( 94 94 vhostPath, self.projectURLProto, self.projectRepoProto) 95 self.downloadResource = DownloadResource( 96 vhostPath, self.projectRepoProto) 97 95 98 self.title = "Ed Suominen's Free & Open Source Software Projects" 96 99 self.style = { … … 188 191 request.uri = request.uri.rstrip("/") + addition 189 192 193 def rootState(segmentList): 194 root = segmentList[0] 195 if len(segmentList) == 1: 196 return root, True 197 if len(segmentList) == 2 and segmentList[1] == '': 198 del segmentList[1] 199 return root, True 200 return root, False 201 190 202 projectName, subSegments = segments[0], list(segments[1:]) 191 203 if not subSegments: 192 204 extendRequest('wiki') 193 root = subSegments[0]205 root, isAtRoot = rootState(subSegments) 194 206 if root == 'api': 195 207 return self.apiDocResource, [projectName] + subSegments[1:] 196 if len(subSegments) == 1: 208 if root == 'download': 209 return self.downloadResource, [projectName] + subSegments[1:] 210 if isAtRoot: 197 211 if root == 'wiki': 198 212 extendRequest("Start_%s" % projectName) 199 213 elif root == 'browser': 200 extendRequest('projects', projectName .lower(), 'trunk')214 extendRequest('projects', projectName, 'trunk') 201 215 possibleResult = self._possibleStatic('trac', *subSegments) 202 216 if possibleResult:
