Commit 1999dedf authored by Kristian Tan's avatar Kristian Tan

String formatting

parent 67501c7f
...@@ -77,13 +77,13 @@ def toggle_pin(change_pin): ...@@ -77,13 +77,13 @@ def toggle_pin(change_pin):
if pins[change_pin]['on_time'] is not None: if pins[change_pin]['on_time'] is not None:
uptime = str(datetime.now() - pins[change_pin]['on_time']) uptime = str(datetime.now() - pins[change_pin]['on_time'])
d = DailyUsage(date=pins[change_pin]['on_time'], hours=uptime) d = DailyUsage(date=pins[change_pin]['on_time'], hours=uptime)
db.session.add(d)
db.session.commit()
print("===========") print("===========")
print(d) print(d)
print("===========") print("===========")
db.session.add(d)
db.session.commit()
pins[change_pin]['on_time'] = None pins[change_pin]['on_time'] = None
print("==========") print("==========")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment