comparison display_issues_demo.py @ 13:149d01f43e31

Split up render_db_stats_as_html function Allow the generated HTML code to be either printed to stdout as before (render_db_stats_as_html) or be returned as a string (compile_db_stats_html). The latter is required for Bottledash.
author Gernot Schulz <gernot@intevation.de>
date Sun, 31 Jan 2016 13:15:08 +0100
parents 99e2e0e17103
children adca5b3780d2
comparison
equal deleted inserted replaced
12:b9a2b828ad18 13:149d01f43e31
14 """ 14 """
15 15
16 from display_issues import * 16 from display_issues import *
17 17
18 cgitb.enable() # (optional) HTML traceback to browser 18 cgitb.enable() # (optional) HTML traceback to browser
19 print("Content-Type: text/html")
20 print()
21 #render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL) 19 #render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL)
22 render_db_stats_as_html(rcd.DATABASE_DEMO, 20 render_db_stats_as_html(rcd.DATABASE_DEMO,
23 rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')")) 21 rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')"))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)