Package madrona :: Package common :: Module assets
[hide private]

Source Code for Module madrona.common.assets

 1  from elementtree import ElementTree as et 
 2  import os 
 3   
 4  ROOT_PATH = '' 
 5   
6 -def get_js_files():
7 """Returns a list of all the javascript files listed in 8 media/js_includes.xml""" 9 files = [] 10 path = os.path.dirname(os.path.abspath(__file__)) 11 tree = et.parse(path + '/../media/js_includes.xml') 12 for f in tree.findall('file'): 13 files.append(ROOT_PATH + f.get('path')) 14 return files
15
16 -def get_js_test_files():
17 """Returns a list of all the javascript test files listed in 18 media/js_includes.xml""" 19 files = [] 20 path = os.path.dirname(os.path.abspath(__file__)) 21 tree = et.parse(path + '/../media/js_includes.xml') 22 for f in tree.findall('test'): 23 files.append(ROOT_PATH + f.get('path')) 24 return files
25
26 -def get_css_files():
27 """Returns a list of all css files listed in 28 media/css_includes.xml""" 29 files = [] 30 path = os.path.dirname(os.path.abspath(__file__)) 31 tree = et.parse(path + '/../media/css_includes.xml') 32 for f in tree.findall('file'): 33 files.append(ROOT_PATH + f.get('path')) 34 return files
35