def execute_compile_sass(args):
 for sys in args.system:
  options = ''
  options += ((' --theme-dirs ' + ' '.join(args.theme_dirs)) if args.theme_dirs else '')
  options += ((' --themes ' + ' '.join(args.themes)) if args.themes else '')
  options += (' --debug' if args.debug else '')
  sh(django_cmd(sys, args.settings, 'compile_sass {system} {options}'.format(system=('cms' if (sys == 'studio') else sys), options=options)))

def execute_compile_sass ( args ) : for sys in args . system : options = '' options += ( ( ' --theme-dirs ' + ' ' . join ( args . theme_dirs ) ) if args . theme_dirs else '' ) options += ( ( ' --themes ' + ' ' . join ( args . themes ) ) if args . themes else '' ) options += ( ' --debug' if args . debug else '' ) sh ( django_cmd ( sys , args . settings , 'compile_sass {system} {options}' . format ( system = ( 'cms' if ( sys == 'studio' ) else sys ) , options = options ) ) )
construct django management command compile_sass and execute it .