Browse Source

Adds datetime to turno

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