diff --git a/Mail/config.py b/Mail/config.py new file mode 100644 index 0000000..f43f323 --- /dev/null +++ b/Mail/config.py @@ -0,0 +1,19 @@ +from flask import Flask +from flask_mail import Mail, Message + +app = Flask(__name__) + + +app.config['MAIL_SERVER']= 'smtp.gmail.com' +#app.config['MAIL_USERNAME'] = 'devesapark@yahoo.com' +#app.config['MAIL_PASSWORD'] = 'xUp7bax8knAVwi' +app.config['MAIL_USERNAME'] = 'devesaparkpadel@gmail.com' +app.config['MAIL_PASSWORD'] = 'xUp7bax8knAVwi' +app.config['MAIL_USE_TLS'] = False # si se pone a True, hay que descomentar la línea siguiente +#app.config['MAIL_PORT'] = 587 +app.config['MAIL_USE_SSL'] = True # si se pone a True, hay que descomentar la línea siguiente +app.config['MAIL_PORT'] = 465 + +mail = Mail(app) + + diff --git a/Padel/servicios/padel/reservas.py b/Padel/servicios/padel/reservas.py index 6ab177f..98185d2 100644 --- a/Padel/servicios/padel/reservas.py +++ b/Padel/servicios/padel/reservas.py @@ -34,8 +34,15 @@ mail = Mail(app) @bp.route("/misreservas") @login_required def misreservas(): + hoy = date.today() + db = get_db() + db.execute( + "DELETE FROM reservas WHERE fecha