diff --git a/django_pyscss/compiler.py b/django_pyscss/compiler.py index cf20595..444f8e5 100644 --- a/django_pyscss/compiler.py +++ b/django_pyscss/compiler.py @@ -22,9 +22,11 @@ config.STATIC_URL = staticfiles_storage.url('scss/') # This is where PyScss places the sprite files. -config.ASSETS_ROOT = os.path.join(settings.STATIC_ROOT, 'scss', 'assets') +config.ASSETS_ROOT = os.path.join(settings.STATIC_ROOT, + settings.COMPRESS_OUTPUT_DIR, 'assets') # PyScss expects a trailing slash. -config.ASSETS_URL = staticfiles_storage.url('scss/assets/') +config.ASSETS_URL = staticfiles_storage.url(settings.COMPRESS_OUTPUT_DIR + + '/assets/') class DjangoScssCompiler(Compiler): diff --git a/tests/test_scss.py b/tests/test_scss.py index f76b3e7..c90c93c 100644 --- a/tests/test_scss.py +++ b/tests/test_scss.py @@ -150,4 +150,4 @@ def test_sprite_images(self): actual = self.compiler.compile_string(SPRITE_MAP) # pyScss puts a cachebuster query string on the end of the URLs, lets # just check that it made the file that we expected. - self.assertTrue(re.search(r'url\(/static/scss/assets/images_icons-.+\.png\?_=\d+', actual)) + self.assertTrue(re.search(r'url\(/static/CACHE/assets/images_icons-.+\.png\?_=\d+', actual))