view modules/roundup_cc/__init__.py @ 17:09e3c38a7802

removing the old template cause of an ambiguous name
author sean
date Wed, 05 Aug 2015 13:36:26 +0200
parents 63b9f41c3008
children
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, target_div_name):
    mod = importlib.import_module("roundup_cc." + chart_data_file)

    return mod.get_chart(target_div_name)

    # 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)