diff 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 diff
--- a/modules/roundup_cc/__init__.py	Tue Aug 04 14:23:53 2015 +0200
+++ b/modules/roundup_cc/__init__.py	Tue Aug 04 16:00:07 2015 +0200
@@ -14,8 +14,29 @@
 See http://www.gnu.org/licenses/gpl-3.0.txt for details
 """
 
-import roundup_cc.display_issues as display
-import roundup_cc.roundup_content_data as rcd
+# import re
+# import , os
 
-def get_tech_intern_chart():
-    return display.render_db_stats_as_html(rcd.DATABASE_TECH_INTERN, rcd.SELECT_ALL)
+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)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)