import codecs
import sass
from pipeline.compilers import CompilerBase


class LibSassCompiler(CompilerBase):
  output_extension = 'css'

  def match_file(self, filename):
    return filename.endswith('.scss')

  def compile_file(self, infile, outfile, outdated=False, force=False):
    f = codecs.open(outfile, 'w', 'utf-8')
    f.write(sass.compile(filename=infile))
    return f.close()

@@ -63,16 +63,48 @@
 lerBase%0A
+from django.conf import settings
 %0A%0Aclass 
@@ -350,16 +350,43 @@
 utf-8')%0A
+    if settings.DEBUG:%0A    
     f.wr
@@ -420,16 +420,100 @@
 nfile))%0A
+    else:%0A        f.write(sass.compile(filename=infile, output_style='compressed'))%0A
     retu

compress in production