diff options
author | Rocky Meza <rocky@fusionbox.com> | 2014-02-03 20:03:52 -0700 |
---|---|---|
committer | Rocky Meza <rocky@fusionbox.com> | 2014-02-03 20:03:52 -0700 |
commit | 6992c5e712db0ffd8517ec31d987d137d48fc3d4 (patch) | |
tree | 3f9127b21ee14d37722cc05219ad1f1385132836 | |
parent | 7ecf33d1ddebf8a71f386a8bb7f3e30b77575580 (diff) | |
download | django-pyscss-6992c5e712db0ffd8517ec31d987d137d48fc3d4.tar.gz |
Move the make ASSETS_ROOT dir call to somewhere useful.
-rw-r--r-- | django_pyscss/compressor.py | 4 | ||||
-rw-r--r-- | django_pyscss/scss.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django_pyscss/compressor.py b/django_pyscss/compressor.py index 6ec9e31..f815cb0 100644 --- a/django_pyscss/compressor.py +++ b/django_pyscss/compressor.py @@ -5,7 +5,7 @@ import os from compressor.filters import FilterBase from compressor.conf import settings -from django_pyscss.scss import DjangoScss, config +from django_pyscss.scss import DjangoScss class DjangoScssFilter(FilterBase): @@ -26,7 +26,5 @@ class DjangoScssFilter(FilterBase): self.relative_to = os.path.dirname(href.replace(settings.STATIC_URL, '')) def input(self, **kwargs): - if not os.path.exists(config.ASSETS_ROOT): - os.makedirs(config.ASSETS_ROOT) return self.compiler.compile(scss_string=self.content, relative_to=self.relative_to) diff --git a/django_pyscss/scss.py b/django_pyscss/scss.py index 634de3a..f73e157 100644 --- a/django_pyscss/scss.py +++ b/django_pyscss/scss.py @@ -151,6 +151,8 @@ class DjangoScss(Scss): Overwritten to call _find_source_file instead of SourceFile.from_filename. Also added the relative_to option. """ + if not os.path.exists(config.ASSETS_ROOT): + os.makedirs(config.ASSETS_ROOT) if super_selector: self.super_selector = super_selector + ' ' self.reset() |