Mercurial > bottledash
comparison modules/roundup_cc/__init__.py @ 13:63b9f41c3008
made the charts a bit more modular - can now define the div_name and the script name in the .conf data
author | sean |
---|---|
date | Wed, 05 Aug 2015 12:37:33 +0200 |
parents | 50f4c64834cb |
children |
comparison
equal
deleted
inserted
replaced
12:50f4c64834cb | 13:63b9f41c3008 |
---|---|
21 | 21 |
22 # from roundup_cc import * | 22 # from roundup_cc import * |
23 | 23 |
24 # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) | 24 # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) |
25 | 25 |
26 def make_chart(chart_data_file): | 26 def make_chart(chart_data_file, target_div_name): |
27 mod = importlib.import_module("roundup_cc." + chart_data_file) | |
27 | 28 |
28 mod = importlib.import_module("roundup_cc." + chart_data_file) | 29 return mod.get_chart(target_div_name) |
29 return mod.get_chart() | |
30 | 30 |
31 # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) | 31 # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) |
32 | 32 |
33 # print(test) | 33 # print(test) |
34 # html = eval(chart_data_file+".py") | 34 # html = eval(chart_data_file+".py") |