comparison display_issues.py @ 3:99c68ebfb3b9

Streamlined to example use. * removed superfluous file * added example file for usage as python module
author Bernhard Reiter <bernhard@intevation.de>
date Mon, 30 Nov 2015 17:46:22 +0100
parents 3e9f4a6803d1
children 99e2e0e17103
comparison
equal deleted inserted replaced
2:3e9f4a6803d1 3:99c68ebfb3b9
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
18 from display_issues import *
19 cgitb.enable() # (optional) HTML traceback to browser
20 print("Content-Type: text/html")
21 print()
18 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL) 22 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL)
19 """ 23 """
20 24
21 import sqlite3 as db 25 import sqlite3 as db
22 import cgitb 26 import cgitb
86 con.close() 90 con.close()
87 91
88 render_webpage(get_webpage()) 92 render_webpage(get_webpage())
89 93
90 94
91 cgitb.enable() 95 if __name__ == '__main__':
92 print("Content-Type: text/html") 96 cgitb.enable()
93 print() 97 print("Content-Type: text/html")
98 print()
99
100 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)