Mercurial > bottledash
view modules/roundup_cc/__init__.py @ 12:50f4c64834cb
delegation of dynamic charts works now
author | sean |
---|---|
date | Tue, 04 Aug 2015 16:00:07 +0200 |
parents | 7a573ec679a6 |
children | 63b9f41c3008 |
line wrap: on
line source
#!/usr/bin/env python """ supplys the data needed to comunicate with the roundup-server, and the sqlite database. Represents the types of errors used in roundup. author: Sascha L. Teichmann <sascha.teichmann@intevation.de> author: Bernhard Reiter <bernhard@intevation.de> author: Sean Engelhardt <sean.engelhardt@intevation.de> (c) 2010,2015 by Intevation GmbH This is Free Software unter the terms of the GNU GENERAL PUBLIC LICENSE Version 3 or later. See http://www.gnu.org/licenses/gpl-3.0.txt for details """ # import re # import , os import importlib # from roundup_cc import * # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) def make_chart(chart_data_file): mod = importlib.import_module("roundup_cc." + chart_data_file) return mod.get_chart() # test = exec(open(PATH + "/" + chart_data_file+'.py').read()) # print(test) # html = eval(chart_data_file+".py") # return html # fp = open(chart_data_file) # contents = fp.read() # return exec(chart_data_file.get_chart() # def get_tech_intern_chart(): # return display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL)