summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiclas Dobbertin <niclas.dobbertin@mailbox.org>2026-07-10 11:51:09 +0200
committerNiclas Dobbertin <niclas.dobbertin@mailbox.org>2026-07-10 11:51:09 +0200
commit5aa8e0d2dafadabbe3796f63741868a9b0d17a5c (patch)
tree8f3177d3c2e8dbebd3b1ad04aa7b8fa6ff060c5c
parentc6c842b93c616a690546c6dd0a029f578ecf5769 (diff)
move into subdirs
-rw-r--r--cgi/add_participant.py (renamed from add_participant.py)0
-rw-r--r--cgi/create_meeting.py (renamed from create_meeting.py)1
-rw-r--r--cgi/init_sqlite.py (renamed from init_sqlite.py)0
-rw-r--r--cgi/view_meeting.py (renamed from view_meeting.py)10
-rw-r--r--www/index.html19
5 files changed, 28 insertions, 2 deletions
diff --git a/add_participant.py b/cgi/add_participant.py
index 7431b3b..7431b3b 100644
--- a/add_participant.py
+++ b/cgi/add_participant.py
diff --git a/create_meeting.py b/cgi/create_meeting.py
index d07172c..01615c2 100644
--- a/create_meeting.py
+++ b/cgi/create_meeting.py
@@ -17,7 +17,6 @@ def create_meeting(meeting_id, meeting_name, meeting_description, meeting_dates)
select = cur.execute(
"SELECT meeting_id FROM meeting;")
meeting_ids = select.fetchall()
- print(meeting_ids)
if meeting_id in (x[0] for x in meeting_ids):
print("meeting_id is already taken!")
else:
diff --git a/init_sqlite.py b/cgi/init_sqlite.py
index acc6153..acc6153 100644
--- a/init_sqlite.py
+++ b/cgi/init_sqlite.py
diff --git a/view_meeting.py b/cgi/view_meeting.py
index 5ec8dd0..69ae1e3 100644
--- a/view_meeting.py
+++ b/cgi/view_meeting.py
@@ -3,6 +3,11 @@
import os
import sqlite3
+from urllib.parse import parse_qs
+
+query_string = os.environ.get("QUERY_STRING")
+params = parse_qs(query_string)
+
db_path = "terminfinder_db.sqlite"
@@ -28,10 +33,13 @@ def extract_meeting(meeting_id):
# Individual dates data
select = cur.execute(f"SELECT * FROM meeting_dates_{meeting_id};")
result = select.fetchall()
- print(result)
return meeting_data
meeting_data = extract_meeting(meeting_id)
+
+print("Content-Type: text/plain")
+print("")
+print()
print(meeting_data)
diff --git a/www/index.html b/www/index.html
new file mode 100644
index 0000000..4811061
--- /dev/null
+++ b/www/index.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<h2>Termin Finden</h2>
+
+<form action="/view_meeting">
+ <label for="a">Zeige Umfrage mit ID:</label><br>
+ <input type="text" id="umfrage id" name="meeting_id" value=""><br>
+ <!--<label for="b">Datum:</label><br>-->
+ <!--<input type="date" id="date" name="date" value=""><br><br>-->
+ <input type="submit" value="Submit">
+</form>
+
+<p>If you click the "Submit" button, the form-data will be sent to a page called "/view_meeting".</p>
+
+</body>
+</html>
+