diff 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
line wrap: on
line diff
--- a/display_issues.py	Wed Apr 15 11:40:28 2015 +0200
+++ b/display_issues.py	Mon Nov 30 17:46:22 2015 +0100
@@ -15,6 +15,10 @@
 
 ##Usage Example: ##
 
+from display_issues import *
+cgitb.enable() # (optional) HTML traceback to browser
+print("Content-Type: text/html")
+print()
 render_db_stats_as_html(rcd.DATABASE_DEMO, rcd.SELECT_ALL)
 """
 
@@ -88,6 +92,9 @@
     render_webpage(get_webpage())
 
 
-cgitb.enable()
-print("Content-Type: text/html")
-print()
\ No newline at end of file
+if __name__ == '__main__':
+    cgitb.enable()
+    print("Content-Type: text/html")
+    print()
+
+    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)