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