def getFilePath(self, site): u""" Answers the file path, based on the URL. Add '/files' to hide Python sources from view. The right 2 slash-parts of the site path are taken for the output (@@@ for now) """ if site.e is not None: return TX.class2Path(site) + "/files/" + "/".join(site.e.path.split("/")[-2:]) return None
def getFilePath(self, site): u""" Answers the file path, based on the URL. Add '/files' to hide Python sources from view. The right 2 slash-parts of the site path are taken for the output (@@@ for now) """ if site.e is not None: return TX.class2Path(site) + '/files/' + '/'.join( site.e.path.split('/')[-2:]) return None
def getFilePath(self, site): u""" Answers the file path, based on the URL. Add '/files' to hide Python sources from view. """ fileName = site.e.path.split('/')[-1:] if fileName: fileName = '/'.join(file) else: fileName = 'index' return TX.class2Path(site) + '/files/' + fileName