Button logic is now working

This commit is contained in:
2024-09-29 01:09:34 +02:00
parent c7e9d5de5a
commit 95ce30c5a9
2 changed files with 31 additions and 2 deletions

View File

@ -27,7 +27,8 @@ def update():
@app.route("/", methods = ['GET'])
def normal():
print(values.split(" "))
return render_template('home.html', dates = wrap(values, 10), total = len(values.split(' ')), days = values.split(' ')[-1])
return render_template('home.html', dates = wrap(values, 10), total = len(values.split(' ')), days = (datetime.datetime.today().date() - datetime.datetime.strptime(values.split(' ')[-1], "%Y-%m-%d").date()).days)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=1)