Mercurial > bottledash
annotate modules/roundup_cc/__init__.py @ 16:f89ad628f831
adding the renamed files
author | sean |
---|---|
date | Wed, 05 Aug 2015 13:33:15 +0200 |
parents | 63b9f41c3008 |
children |
rev | line source |
---|---|
11 | 1 #!/usr/bin/env python |
2 | |
3 """ supplys the data needed to comunicate with the roundup-server, | |
4 and the sqlite database. Represents the types of errors used in roundup. | |
5 | |
6 author: Sascha L. Teichmann <sascha.teichmann@intevation.de> | |
7 author: Bernhard Reiter <bernhard@intevation.de> | |
8 author: Sean Engelhardt <sean.engelhardt@intevation.de> | |
9 | |
10 (c) 2010,2015 by Intevation GmbH | |
11 | |
12 This is Free Software unter the terms of the | |
13 GNU GENERAL PUBLIC LICENSE Version 3 or later. | |
14 See http://www.gnu.org/licenses/gpl-3.0.txt for details | |
15 """ | |
16 | |
12 | 17 # import re |
18 # import , os | |
11 | 19 |
12 | 20 import importlib |
21 | |
22 # from roundup_cc import * | |
23 | |
24 # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) | |
25 | |
13
63b9f41c3008
made the charts a bit more modular - can now define the div_name and the script name in the .conf data
sean
parents:
12
diff
changeset
|
26 def make_chart(chart_data_file, target_div_name): |
63b9f41c3008
made the charts a bit more modular - can now define the div_name and the script name in the .conf data
sean
parents:
12
diff
changeset
|
27 mod = importlib.import_module("roundup_cc." + chart_data_file) |
12 | 28 |
13
63b9f41c3008
made the charts a bit more modular - can now define the div_name and the script name in the .conf data
sean
parents:
12
diff
changeset
|
29 return mod.get_chart(target_div_name) |
12 | 30 |
31 # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) | |
32 | |
33 # print(test) | |
34 # html = eval(chart_data_file+".py") | |
35 # return html | |
36 # fp = open(chart_data_file) | |
37 # contents = fp.read() | |
38 | |
39 # return exec(chart_data_file.get_chart() | |
40 | |
41 # def get_tech_intern_chart(): | |
42 # return display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL) |