From f1d1504657a12c1cb2a7938ec43c4eb57ffed6dd Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 7 Nov 2023 23:11:08 +1100 Subject: [PATCH] fix: Update logging --- gift.py | 10 +++++----- main.py | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gift.py b/gift.py index 82cc494..84bcaee 100644 --- a/gift.py +++ b/gift.py @@ -10,10 +10,10 @@ def gift(name,email,referer, ip): global loaded global gifts - print("Name: " + name) - print("Email: " + email) - print("Referer: " + referer) - print("IP: " + ip) + print("Name: " + name,flush=True) + print("Email: " + email,flush=True) + print("Referer: " + referer,flush=True) + print("IP: " + ip,flush=True) path = '/data/gifts.json' if os.getenv('local') == 'true': @@ -46,5 +46,5 @@ def gift(name,email,referer, ip): # Save the file with open(path, 'w') as f: json.dump(gifts, f) - + return True \ No newline at end of file diff --git a/main.py b/main.py index fd12eb2..4ba7c45 100644 --- a/main.py +++ b/main.py @@ -35,7 +35,9 @@ def submit(): hidden = 'None' status = gift.gift(name, email, hidden, ip) - print(status) + print(status,flush=True) + print(request.headers,flush=True) + if status == True: return render_template('success.html') else: