sean@16: #!/usr/bin/env python3 sean@16: sean@16: """ Fetch issues from a roundup-tracker and save them in a databse. sean@16: sean@16: author: Sascha L. Teichmann sean@16: author: Bernhard Reiter sean@16: author: Sean Engelhardt sean@16: sean@16: (c) 2010,2015 by Intevation GmbH sean@16: sean@16: This is Free Software unter the terms of the sean@16: GNU GENERAL PUBLIC LICENSE Version 3 or later. sean@16: See http://www.gnu.org/licenses/gpl-3.0.txt for details sean@16: """ sean@16: sean@16: import importlib sean@16: sean@16: def get_chart(target_div_name): sean@16: display = importlib.import_module("web_view.display_issues") sean@16: rcd = importlib.import_module("web_view.roundup_content_data") sean@16: # print(display_issues.render_db_stats_as_html(roundup_content_data.DATABASE_TECH_INTERN, roundup_content_data.SELECT_ALL)) sean@16: # print (display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL)) sean@16: html_string = display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL) sean@16: sean@16: html_string = html_string.replace( sean@16: 'var d3jsInjectionTarget="X";', 'var d3jsInjectionTarget="' + target_div_name + '";') sean@16: sean@16: # print(html_string) sean@16: sean@16: return html_string sean@16: sean@16: # get_chart();