comparison display_issues.py @ 7:99e2e0e17103

Adding possibility and example to filter the entries.
author Bernhard Reiter <bernhard@intevation.de>
date Tue, 01 Dec 2015 09:02:35 +0100
parents 99c68ebfb3b9
children 149d01f43e31
comparison
equal deleted inserted replaced
6:a1e71b5e4d68 7:99e2e0e17103
12 GNU GENERAL PUBLIC LICENSE Version 3 or later. 12 GNU GENERAL PUBLIC LICENSE Version 3 or later.
13 See http://www.gnu.org/licenses/gpl-3.0.txt for details 13 See http://www.gnu.org/licenses/gpl-3.0.txt for details
14 14
15 15
16 ##Usage Example: ## 16 ##Usage Example: ##
17 17 see display_issues_demo.py or __main__ section below.
18 from display_issues import *
19 cgitb.enable() # (optional) HTML traceback to browser
20 print("Content-Type: text/html")
21 print()
22 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL)
23 """ 18 """
24 19
25 import sqlite3 as db 20 import sqlite3 as db
26 import cgitb 21 import cgitb
27 import roundup_content_data as rcd 22 import roundup_content_data as rcd
92 render_webpage(get_webpage()) 87 render_webpage(get_webpage())
93 88
94 89
95 if __name__ == '__main__': 90 if __name__ == '__main__':
96 cgitb.enable() 91 cgitb.enable()
97 print("Content-Type: text/html") 92 #spit out HTML file directly, thus no need to give headers to the server
98 print() 93 #print("Content-Type: text/html")
94 #print()
99 95
100 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL) 96 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)