Example #1
0
def asset(config, value):
    """Get asset file url"""
    asset_path = config.path['asset']
    rel = urljoin(asset_path, value)
    return real_url(config.site.url, rel)
Example #2
0
 def url(self):
     relative_url = path_to_url(self.file_path)
     if not relative_url.startswith('/'):
         relative_url = '/' + relative_url
     return real_url(configs.site.url, relative_url)
Example #3
0
 def url(self):
     relative_url = path_to_url(self.file_path)
     if not relative_url.startswith('/'):
         relative_url = '/'+relative_url
     return real_url(configs.site.url, relative_url)
Example #4
0
def asset(config, value):
    """Get asset file url"""
    asset_path = config.path['asset']
    rel = urljoin(asset_path, value)
    return real_url(config.site.url, rel)