def get_xstatic_dirs(XSTATIC_MODULES, HORIZON_CONFIG):
 STATICFILES_DIRS = []
 HORIZON_CONFIG['xstatic_lib_files'] = []
 for (module_name, files) in XSTATIC_MODULES:
  module = import_module(module_name)
  if (module_name == 'xstatic.pkg.jquery_ui'):
   if module.VERSION.startswith('1.10.'):
    files = [('ui/' + files[0])]
  STATICFILES_DIRS.append((('horizon/lib/' + module.NAME), module.BASE_DIR))
  if hasattr(module, 'MAIN'):
   files = module.MAIN
   if (not isinstance(files, list)):
    files = [files]
   files = [file for file in files if file.endswith('.js')]
  for file in files:
   file = ((('horizon/lib/' + module.NAME) + '/') + file)
   HORIZON_CONFIG['xstatic_lib_files'].append(file)
 return STATICFILES_DIRS

def get_xstatic_dirs ( XSTATIC_MODULES , HORIZON_CONFIG ) : STATICFILES_DIRS = [ ] HORIZON_CONFIG [ 'xstatic_lib_files' ] = [ ] for ( module_name , files ) in XSTATIC_MODULES : module = import_module ( module_name ) if ( module_name == 'xstatic.pkg.jquery_ui' ) : if module . VERSION . startswith ( '1.10.' ) : files = [ ( 'ui/' + files [ 0 ] ) ] STATICFILES_DIRS . append ( ( ( 'horizon/lib/' + module . NAME ) , module . BASE_DIR ) ) if hasattr ( module , 'MAIN' ) : files = module . MAIN if ( not isinstance ( files , list ) ) : files = [ files ] files = [ file for file in files if file . endswith ( '.js' ) ] for file in files : file = ( ( ( 'horizon/lib/' + module . NAME ) + '/' ) + file ) HORIZON_CONFIG [ 'xstatic_lib_files' ] . append ( file ) return STATICFILES_DIRS
discover static file configuration of the xstatic modules .