Exemple #1
0
 def __init__(self, base_url, alias, repo_id):
     """
     :param base_url: The base URL.
     :type base_url: str
     :param alias: The httpd alias (base_url, publish_dir)
     :type alias: tuple(2)
     :param repo_id: A repository ID.
     :type repo_id: str
     """
     self.base_url = base_url
     self.alias = alias
     FilePublisher.__init__(self, alias[1], repo_id)
Exemple #2
0
 def __init__(self, base_url, alias, repo_id):
     """
     :param base_url: The base URL.
     :type base_url: str
     :param alias: The httpd alias (base_url, publish_dir)
     :type alias: tuple(2)
     :param repo_id: A repository ID.
     :type repo_id: str
     """
     self.base_url = base_url
     self.alias = alias
     FilePublisher.__init__(self, alias[1], repo_id)
Exemple #3
0
 def link(self, units):
     # Add the URL to each unit.
     links = FilePublisher.link(self, units)
     for unit, relative_path in links:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return links
Exemple #4
0
 def link_unit(self, units):
     # Add the URL to each unit.
     unit, relative_path = FilePublisher.link_unit(self, units)
     if relative_path:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return unit, relative_path
Exemple #5
0
 def link_unit(self, units):
     # Add the URL to each unit.
     unit, relative_path = FilePublisher.link_unit(self, units)
     if relative_path:
         url = join(self.base_url, self.alias[0], relative_path)
         unit['_download'] = dict(url=url)
     return unit, relative_path