summaryrefslogtreecommitdiff
path: root/cgi-bin/add.py
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/add.py')
-rw-r--r--cgi-bin/add.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/cgi-bin/add.py b/cgi-bin/add.py
index e69de29..440b67f 100644
--- a/cgi-bin/add.py
+++ b/cgi-bin/add.py
@@ -0,0 +1,22 @@
+#!C:\Python364\python3.exe
+# -*- coding: utf-8 -*-
+import sys, codecs
+import cgi, cgitb
+import pymysql
+import issuedb
+from issuedb import IssueDBFactory
+sys.stdout = codecs.getwriter('utf8')(sys.stdout.buffer)
+
+db = IssueDBFactory.produce()
+cursor = db.cursor()
+
+print("Content-type:text/html\n")
+redirect = """
+<html>
+<head>
+<meta http-equiv="refresh" content="0;url=issue?id={0}">
+</head>
+</html>
+""".format(1)
+print(redirect)
+