Commit 67fc9863 by Timothée Peignier

improving windows paths support

parent a985029e
......@@ -142,7 +142,8 @@ class Compressor(object):
return "__EMBED__%s" % public_path
if not os.path.isabs(asset_path):
asset_path = self.relative_path(public_path)
return settings.PIPELINE_URL + asset_path[1:]
asset_url = asset_path.replace(os.sep, '/')
return settings.PIPELINE_URL + asset_url[1:]
def embeddable(self, path, variant):
"""Is the asset embeddable ?"""
......
......@@ -38,8 +38,10 @@ class Packager(object):
)
def individual_url(self, filename):
relative_path = self.compressor.relative_path(filename)[1:]
relative_url = relative_path.replace(os.sep, '/')
return urlparse.urljoin(settings.PIPELINE_URL,
self.compressor.relative_path(filename)[1:])
relative_url)
def pack_stylesheets(self, package, **kwargs):
variant = package.get('variant', None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment