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