Esempio n. 1
0
 def construct_asset_path(self, asset_path, css_path, variant=None, absolute_asset_paths=True):
     """Return a rewritten asset URL for a stylesheet"""
     public_path = self.absolute_path(asset_path, os.path.dirname(css_path))
     if self.embeddable(public_path, variant):
         return "__EMBED__%s" % public_path
     if not absolute_asset_paths:
         return asset_path
     if not os.path.isabs(asset_path):
         asset_path = self.relative_path(public_path)
     asset_url = filepath_to_uri(asset_path)
     return settings.PIPELINE_URL + asset_url[1:]
Esempio n. 2
0
 def construct_asset_path(self,
                          asset_path,
                          css_path,
                          variant=None,
                          absolute_asset_paths=True):
     """Return a rewritten asset URL for a stylesheet"""
     public_path = self.absolute_path(asset_path, os.path.dirname(css_path))
     if self.embeddable(public_path, variant):
         return "__EMBED__%s" % public_path
     if not absolute_asset_paths:
         return asset_path
     if not os.path.isabs(asset_path):
         asset_path = self.relative_path(public_path)
     asset_url = filepath_to_uri(asset_path)
     return settings.PIPELINE_URL + asset_url[1:]
Esempio n. 3
0
 def individual_url(self, filename):
     relative_path = self.compressor.relative_path(filename)[1:]
     return urlparse.urljoin(settings.PIPELINE_URL,
         filepath_to_uri(relative_path))
Esempio n. 4
0
 def individual_url(self, filename):
     relative_path = self.compressor.relative_path(filename)[1:]
     return urlparse.urljoin(settings.PIPELINE_URL,
                             filepath_to_uri(relative_path))