@task
@cmdopts([BOKCHOY_IMPORTS_DIR, BOKCHOY_IMPORTS_DIR_DEPR, BOKCHOY_DEFAULT_STORE, BOKCHOY_DEFAULT_STORE_DEPR])
@timed
def load_courses(options):
 if ('imports_dir' in options):
  msg = colorize('green', 'Importing courses from {}...'.format(options.imports_dir))
  print msg
  sh('DEFAULT_STORE={default_store} ./manage.py cms --settings=bok_choy import {import_dir}'.format(default_store=options.default_store, import_dir=options.imports_dir))
 else:
  print colorize('blue', '--imports-dir not set, skipping import')

@ task @ cmdopts ( [ BOKCHOY_IMPORTS_DIR , BOKCHOY_IMPORTS_DIR_DEPR , BOKCHOY_DEFAULT_STORE , BOKCHOY_DEFAULT_STORE_DEPR ] ) @ timed def load_courses ( options ) : if ( 'imports_dir' in options ) : msg = colorize ( 'green' , 'Importing courses from {}...' . format ( options . imports_dir ) ) print msg sh ( 'DEFAULT_STORE={default_store} ./manage.py cms --settings=bok_choy import {import_dir}' . format ( default_store = options . default_store , import_dir = options . imports_dir ) ) else : print colorize ( 'blue' , '--imports-dir not set, skipping import' )
loads courses from options .