示例#1
0
 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
示例#2
0
 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
示例#3
0
 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
示例#4
0
文件: shop.py 项目: math-u/Xierpa3
 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