Browse Source

Adds datetime to turno

Jose Reyes 6 years ago
parent
commit
59ffe580a3
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      app/index.py

+ 3
- 1
app/index.py View File

@@ -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'))