Mercurial > roundup-cc
view 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 |
line wrap: on
line source
#!/usr/bin/env python3 """ Fetch issues from a roundup-tracker and save them in a databse. 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 """ from display_issues import * cgitb.enable() # (optional) HTML traceback to browser #render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL) render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_WHERE.format("timestamp > date('now', '-2 month')"))