瀏覽代碼

Adds datetime to turno

Jose Reyes 5 年之前
父節點
當前提交
59ffe580a3
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      app/index.py

+ 3
- 1
app/index.py 查看文件

@@ -1,3 +1,5 @@
1
+from datetime import datetime
2
+
1 3
 from flask import (
2 4
     Blueprint, flash, g, redirect, render_template, request, url_for
3 5
 )
@@ -34,7 +36,7 @@ def index():
34 36
         db.execute(
35 37
             'INSERT INTO turno (cName, cEmail, turn, timeArrival, station)'
36 38
             ' VALUES (?, ?, ?, ?, ?)',
37
-            (cName, cEmail, turn, 'testin', station_id)
39
+            (cName, cEmail, turn, '{0:%H:%M}'.format(datetime.now()), station_id)
38 40
         )
39 41
         db.commit()
40 42
         return redirect(url_for('index'))