annotate 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
rev   line source
11
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
1 #!/usr/bin/env python
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
2
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
3 """ supplys the data needed to comunicate with the roundup-server,
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
4 and the sqlite database. Represents the types of errors used in roundup.
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
5
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
6 author: Sascha L. Teichmann <sascha.teichmann@intevation.de>
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
7 author: Bernhard Reiter <bernhard@intevation.de>
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
8 author: Sean Engelhardt <sean.engelhardt@intevation.de>
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
9
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
10 (c) 2010,2015 by Intevation GmbH
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
11
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
12 This is Free Software unter the terms of the
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
13 GNU GENERAL PUBLIC LICENSE Version 3 or later.
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
14 See http://www.gnu.org/licenses/gpl-3.0.txt for details
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
15 """
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
16
12
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
17 # import re
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
18 # import , os
11
7a573ec679a6 added more files, can now display charts a bit
sean
parents:
diff changeset
19
12
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
20 import importlib
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
21
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
22 # from roundup_cc import *
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
23
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
24 # PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
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
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
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
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
30
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
31 # test = exec(open(PATH + "/" + chart_data_file+'.py').read())
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
32
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
33 # print(test)
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
34 # html = eval(chart_data_file+".py")
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
35 # return html
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
36 # fp = open(chart_data_file)
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
37 # contents = fp.read()
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
38
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
39 # return exec(chart_data_file.get_chart()
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
40
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
41 # def get_tech_intern_chart():
50f4c64834cb delegation of dynamic charts works now
sean
parents: 11
diff changeset
42 # 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)