This commit is contained in:
parent
37ee3e747a
commit
f1d1504657
10
gift.py
10
gift.py
@ -10,10 +10,10 @@ def gift(name,email,referer, ip):
|
|||||||
global loaded
|
global loaded
|
||||||
global gifts
|
global gifts
|
||||||
|
|
||||||
print("Name: " + name)
|
print("Name: " + name,flush=True)
|
||||||
print("Email: " + email)
|
print("Email: " + email,flush=True)
|
||||||
print("Referer: " + referer)
|
print("Referer: " + referer,flush=True)
|
||||||
print("IP: " + ip)
|
print("IP: " + ip,flush=True)
|
||||||
|
|
||||||
path = '/data/gifts.json'
|
path = '/data/gifts.json'
|
||||||
if os.getenv('local') == 'true':
|
if os.getenv('local') == 'true':
|
||||||
@ -46,5 +46,5 @@ def gift(name,email,referer, ip):
|
|||||||
# Save the file
|
# Save the file
|
||||||
with open(path, 'w') as f:
|
with open(path, 'w') as f:
|
||||||
json.dump(gifts, f)
|
json.dump(gifts, f)
|
||||||
|
|
||||||
return True
|
return True
|
4
main.py
4
main.py
@ -35,7 +35,9 @@ def submit():
|
|||||||
hidden = 'None'
|
hidden = 'None'
|
||||||
|
|
||||||
status = gift.gift(name, email, hidden, ip)
|
status = gift.gift(name, email, hidden, ip)
|
||||||
print(status)
|
print(status,flush=True)
|
||||||
|
print(request.headers,flush=True)
|
||||||
|
|
||||||
if status == True:
|
if status == True:
|
||||||
return render_template('success.html')
|
return render_template('success.html')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user