From bbe3351788de13184b0efd0d4ad86efcd1cc7576 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 19:35:27 -0600 Subject: [PATCH 01/26] Clase 228. Creando nuestro proyecto --- .gitignore | 1 + app/__init__.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 app/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5e96db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..d59bd10 --- /dev/null +++ b/app/__init__.py @@ -0,0 +1,16 @@ +import os + +from flask import Flask + +def create_app(): + app = Flask(__name__) + app.config.from_mapping( + SENDGRID_KEY=os.environ.get('SENDGRID_API_KEY'), + SECRET_KEY=os.environ.get('SECRET_KEY'), + DATABASE_HOST=os.environ.get('FLASK_DATABASE_HOST'), + DATABASE_PASSWORD=os.environ.get('FLASK_DATABASE_PASSWORD'), + DATABASE_USER=os.environ.get('FLASK_DATABASE_USER'), + DATABASE=os.environ.get('FLASK_DATABASE'), + ) + + return app \ No newline at end of file From 653d6b8ead484c7339252ca1077565347eb38ccf Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 20:08:50 -0600 Subject: [PATCH 02/26] =?UTF-8?q?Clase=20229.=20Abstracci=C3=B3n=20de=20ba?= =?UTF-8?q?se=20de=20datos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__init__.py | 7 +++++-- app/db.py | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 app/db.py diff --git a/app/__init__.py b/app/__init__.py index d59bd10..c5906ba 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -12,5 +12,8 @@ def create_app(): DATABASE_USER=os.environ.get('FLASK_DATABASE_USER'), DATABASE=os.environ.get('FLASK_DATABASE'), ) - - return app \ No newline at end of file + + from . import db + db.init_app(app) + + return app diff --git a/app/db.py b/app/db.py new file mode 100644 index 0000000..1400882 --- /dev/null +++ b/app/db.py @@ -0,0 +1,40 @@ +import mysql.connector + +import click +from flask import current_app, g +from flask.cli import with_appcontext +from .schema import instructions + +def get_db(): + if "db" not in g: + g.db = mysql.connector.connect( + host=current_app.config["DATABASE_HOST"], + user=current_app.config["DATABASE_USER"], + password=current_app.config["DATABASE_PASSWORD"], + database=current_app.config["DATABASE"], + ) + g.c = g.db.cursor(dictionary=True) + return g.db, g.c + +def close_db(e=None): + db = g.pop("db", None) + + if db is not None: + db.close() + +def init_db(): + db, c = get_db() + + for i in instructions: + c.execute(i) + db.commit() + +@click.command("init-db") +@with_appcontext +def init_db_command(): + init_db() + click.echo("Base de Datos inicializada") + +def init_app(app): + app.teardown_appcontext(close_db) + app.cli.add_command(init_db_command) \ No newline at end of file From b8407156bf62e97af880c636382092dee61a15c1 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 20:13:16 -0600 Subject: [PATCH 03/26] Clase 230. Creando nuestro esquema de base de datos --- .env | 4 ++++ .gitignore | 3 ++- app/__pycache__/__init__.cpython-38.pyc | Bin 0 -> 727 bytes app/__pycache__/db.cpython-38.pyc | Bin 0 -> 1452 bytes app/__pycache__/schema.cpython-38.pyc | Bin 0 -> 381 bytes app/schema.py | 11 +++++++++++ 6 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .env create mode 100644 app/__pycache__/__init__.cpython-38.pyc create mode 100644 app/__pycache__/db.cpython-38.pyc create mode 100644 app/__pycache__/schema.cpython-38.pyc create mode 100644 app/schema.py diff --git a/.env b/.env new file mode 100644 index 0000000..7bf855c --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +FLASK_DATABASE_HOST=localhost +FLASK_DATABASE_PASSWORD=chamaco95 +FLASK_DATABASE_USER=root +FLASK_DATABASE=mailerapp diff --git a/.gitignore b/.gitignore index f5e96db..b8a1259 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -venv \ No newline at end of file +venv +env \ No newline at end of file diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce4bc1a286db2c6f789edfc362818bd311d689d9 GIT binary patch literal 727 zcmZWn&2G~`5Z+z?#Icf6!~u?6eZen)5T&sF6?UGGTN%%4dV*K|1ep?J_f!r!_*$7RVFy4+RbG(E9QDI zQ&LcotyV=f*F@I3$E#0;l9jgRywONGrVFpAiiQF!Alibh&Hg}Y4-T*2g$pToC@aoX zb}qwwt!i1*HREFQC!niMvyc^C$TFj1T`?JotSGsHQlT+QTLJoPwb6dAc-C;EX0+=k z;1Kq(i~Za0+U*apPt-n~1-3HJL_0I{gxZ_7`L??|?tvkB&xK^`lD{z1scmo`8Ia%Y C1GAI> literal 0 HcmV?d00001 diff --git a/app/__pycache__/db.cpython-38.pyc b/app/__pycache__/db.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..515ed8d3a2d2a28df9647684a16250a67e6d25a5 GIT binary patch literal 1452 zcmZ8g&2HO95Z+l*B=u)GNn5~a(W;jMEKutOilR=OwkM~s926j05G(H5qQoC%cLhg= z+>3q9JII#;d4@hkuY2t&uTb>R*_GtTU1EP`hvaV9`Ese^!7LmN&NUdMkXgQHSKIJrKohuW-|j9 zF__+EuE*BQ>Pm|@`aR&Qc;Cq@rR6-+d0nZ@e!n{cG@j#Br?_y?WE#pJG)(Bk)BdEv z=>c)Ox7q#8-Z;Qa-ujxPfhLn+67rBoZ}IyyvNq1>oFd}piJ^RCy2nRnN6(IiFVdf0 z4$pSXSHl;l=Fz?P=cD29mzSr|IDF^zJeUKdFd>8M1eYiYvGQBvy<&^pgAWVklwQsFC*y(97?ym8AvKMuxq zDF$^VxMb6MfTXKhrE@OI#o9<`3q7u@bX*rKE$0=l2PMl3AyJ5doqTjSTbSTN=#-Bl z{IhzD3xNm%obLHI3id&Mg14E~Y&$GUTXIgGJ{~k#0mp*7qt~#+ecF_tEn!9Ph%GlH zo1VCAVsFiWH>+o+krlNPSTP`+^Fwy>WBjLyoFB10K}*?kAkd)^$ftOEP%f6$dpuvG zp~(&Tm0pu;&~QwC+q{~u$RSGlF{0Nu)RNT7ufJ0L&D^ObXd!$%L$+P5s?=Qx#B)S?BV5g`YQaKqTu z(`Q&ieJ=XPOxLQ9p|YG6`4!^~Vc7td!#tZBUu5HY2b-%CM`CXSFtzEhiuY|$%N6kg zkYD2dKv}EuJvPfTa)rn&swJ7w6}H|Mq5Krxal<^(f=OOqRy!T;Br+a?Gi}ECHn@w2 zjqhRk?Vw$&?SP`=EBx&mA+$hRD@Kj>lb-9E!~3R@J#@)0a50VZf~l!%o^^dS-Nhls zmp0cVP}x|N%t^c!+vc{W5PQ!t7DeV_{nWF(QAE1a)R|rj$l5C*$65{S+qRDQ^W)CUizj*YIq~OWF z@E~r|2qHdsZ+N_!VJ4Z)CWgk-+cSCB^`kexVQF)rDW_VfLCt&X)}U5w*n6A9>nL0T zb}xMd-VLCY7vmUMl@;ab=4ApJR}peC8heHWj)nlBpx^} z1q$%-*ti?RXoVpNH51?eiKM!FV5EhALn3&~_@8jxY3mx;=5|_e**1!_h2ZklX!>^t z`J6kssF))-qfPcG9HJU2WU45ux}8buuFVBcb5Uk#r8pH%|2k{3x^{X>lIz<~>TY{* SRtc&~cHZxo`&um1`uYZF1Z9f= literal 0 HcmV?d00001 diff --git a/app/schema.py b/app/schema.py new file mode 100644 index 0000000..afcd0c3 --- /dev/null +++ b/app/schema.py @@ -0,0 +1,11 @@ +instructions = [ + "DROP TABLE IF EXISTS email;", + """ + CREATE TABLE email ( + id INT PRIMARY KEY AUTO_INCREMENT, + email TEXT NOT NULL, + subject TEXT NOT NULL, + content TEXT NOT NULL + ) + """ +] \ No newline at end of file From 7b759fd9b0e7c92be348cea7bf53630bdfc2ee55 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 21:13:45 -0600 Subject: [PATCH 04/26] Clase 232. Definiendo el blueprint --- app/__init__.py | 4 +++- app/__pycache__/__init__.cpython-38.pyc | Bin 727 -> 797 bytes app/__pycache__/mail.cpython-38.pyc | Bin 0 -> 452 bytes app/mail.py | 9 +++++++++ app/templates/base.html | 3 +++ app/templates/mail/index.html | 5 +++++ 6 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 app/__pycache__/mail.cpython-38.pyc create mode 100644 app/mail.py create mode 100644 app/templates/base.html create mode 100644 app/templates/mail/index.html diff --git a/app/__init__.py b/app/__init__.py index c5906ba..3d844fe 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -15,5 +15,7 @@ def create_app(): from . import db db.init_app(app) - + from . import mail + app.register_blueprint(mail.bp) + return app diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc index ce4bc1a286db2c6f789edfc362818bd311d689d9..24602e1912295d5459be83a953b701ecb06b2681 100644 GIT binary patch delta 225 zcmcc4I+u+%l$V!_0SJ!Vt4sEr$Q#ec4CHVEu`>`CH%+X{luO}A;mTpp<*H?3WT;_S zz+Jrt z6lLa>++s>9&}6>FoLEp$#0pdcR=AR(NN}`CXHBfiWUFBaX3*rC%*c3-k!$h| zMh^i^rd!O31qDT{KqV^~iufi6F(s!+067ed9E@y?TnPA!jgyCwi>XKeD5uF%1Tyy) rYg$fXadr{N93ABcq@_(6&|Y;yBcN^?@}7=gTE79hdF#KQyt%F-U{ diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd5a64209c0d04c2c533489ce5c09c08137e4dab GIT binary patch literal 452 zcmYjMu};G<5Vf78O-oDpjV#T|fDi&9#8Qx2mMm7NuS%#LTTUXi3@l~kL--nYPe@Gs zLMP7YKu@~od-mPE=cn;_NHF00ZTW@gk0-|wA-Te=&k+O>R1!rqs#wM-0V)^-A`sz6 zkcAMwL|8|n_rXM8#P4KBvz{2tNizJ!X_7EExRxy#TUL#mSf~V8-heVPZ@`5rFXf)5 z33bEPN^UHy$_)+$cee`{K0eGB_|#X>6k60vzwtO2k{irAMrhFKj-oP~y-xhzv_!GZ zv}lw}s12~?lUV=t4)*tHp%tXM0%7yDPM58%bTNMJt)tYwK@22QKEk$`x?#*t2nw)olY^_rJ44b%G-< UzEE1U5-usS+6$b8r*uUB0Mk}*mjD0& literal 0 HcmV?d00001 diff --git a/app/mail.py b/app/mail.py new file mode 100644 index 0000000..3152e48 --- /dev/null +++ b/app/mail.py @@ -0,0 +1,9 @@ +from flask import ( + Blueprint, render_template + ) + +bp = Blueprint('mail', __name__, url_prefix='/') +@bp.route("/", methods=('GET', 'POST')) +def index(): + return render_template('mail/index.html') + diff --git a/app/templates/base.html b/app/templates/base.html new file mode 100644 index 0000000..83911ee --- /dev/null +++ b/app/templates/base.html @@ -0,0 +1,3 @@ +texto lala + +{% block content %}{% endblock %} \ No newline at end of file diff --git a/app/templates/mail/index.html b/app/templates/mail/index.html new file mode 100644 index 0000000..c4ca49b --- /dev/null +++ b/app/templates/mail/index.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +Soy HTML +{% endblock %} \ No newline at end of file From 330d5b56c6e5c6c6b0449c39002768168a2bd336 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 21:26:37 -0600 Subject: [PATCH 05/26] Clase 233. Creando el HTML base --- app/static/style.css | 3 +++ app/templates/base.html | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 app/static/style.css diff --git a/app/static/style.css b/app/static/style.css new file mode 100644 index 0000000..5f8dba8 --- /dev/null +++ b/app/static/style.css @@ -0,0 +1,3 @@ +body { + font-family: 'Raleway', sans-serif; +} \ No newline at end of file diff --git a/app/templates/base.html b/app/templates/base.html index 83911ee..3b92338 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,3 +1,17 @@ -texto lala + +{% block title %}{% endblock %} - Mailer + + + + -{% block content %}{% endblock %} \ No newline at end of file + + +
+
+
+ +
+
+ {% block content %}{% endblock %} +
\ No newline at end of file From d4062206df3e047ab0d56067469caf81387b7c91 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 21:38:40 -0600 Subject: [PATCH 06/26] Clase 234. Agregando estilos a la base --- app/static/style.css | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/app/static/style.css b/app/static/style.css index 5f8dba8..050c944 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -1,3 +1,34 @@ body { font-family: 'Raleway', sans-serif; + background-color: #f5f5f5; +} + +nav { + background-color: #fff; + box-shadow: 0px 1px 2px #ddd; + position: fixed; + top: 0; + left: 0; + width: 100px; + height: 100%; + padding-left: 30px; + padding-right: 30px; + padding-top: 30px; +} + +.content { + margin-left: 180px; + padding: 30px; +} + +form input { + font-family: 'Raleway', sans-serif; + border: 0; + height: 30px; + padding: 5px 15px; + border-radius: 30px; + box-shadow: 0 1px 5px #ddd; + outline: none; + width: 450px; + display: block; } \ No newline at end of file From 6888facd59eb8bd3f010dcd4c3f3833b1a2a4b14 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 22:36:13 -0600 Subject: [PATCH 07/26] Clase 235. Listando Correos --- app/__pycache__/mail.cpython-38.pyc | Bin 452 -> 590 bytes app/mail.py | 8 +++++++- app/templates/base.html | 8 ++++++++ app/templates/mail/index.html | 20 +++++++++++++++++++- 4 files changed, 34 insertions(+), 2 deletions(-) diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc index bd5a64209c0d04c2c533489ce5c09c08137e4dab..fa0b5fb707bd927ebff6523fed21439950f05cee 100644 GIT binary patch delta 406 zcmYL@Jx;?w5QTSU*N$;Q2+)EQi3U@^1rQBC1>#2{q_L1JJF_8x4bj?2QG}s@4yA~= z0F>N=ngi@HI055Ou+lueZ>4!}zT~%RcIW4P!SCnivDblVbLDW4i3C9^G6*5V5TRmB zWu`&}LIX+dkRoRyLsz@kHTEvmCP*I5y@+QBJ@Pvus80uLegM|J)I~(e^mY45a<<~x z<;mAs3h^v1uoNXcz&j9pK#A<|LzGxZ!UrTdK@L+V`;%bKI{h@xZwxZd0zx+)4mT#qwDQvw=DeNg6Eey?!QEVxk!3>&Q6HAmQF0`=)8Oa31&Oltu0VGO* zCN?tyRWSKg@#iLH=ICeUrKDEqWt8ORXfhTt1C^{~C;~a9h--2sV`w%TNGHe$2Bsn& zAnB*cev36NC$TuY2qX&Daf>59J})shH9r0pQ&Pb#)}s8 +
+ {% block header %}{% endblock %} +
+ + {% for message in get_flashed_messages() %} +
{{ message }}
+ {% endfor %} + {% block content %}{% endblock %} \ No newline at end of file diff --git a/app/templates/mail/index.html b/app/templates/mail/index.html index c4ca49b..ff7ddde 100644 --- a/app/templates/mail/index.html +++ b/app/templates/mail/index.html @@ -1,5 +1,23 @@ {% extends "base.html" %} +{% block header %} +

{% block title %} Correos Enviados {% endblock %}

+{% endblock %} + {% block content %} -Soy HTML +
    + {% for mail in mails %} +
  • +
    + + {{ mail["subject"]}} +
    +

    {{ mail["content"] }}

    + +
    + +
  • + {% endfor %} +
+ {% endblock %} \ No newline at end of file From f1207045758a4f3d72b596e2fcf8ea49c9cee810 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 23:00:10 -0600 Subject: [PATCH 08/26] Clase 236. Agregando estilo a los correos listados --- app/static/style.css | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/static/style.css b/app/static/style.css index 050c944..1d11b9f 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -19,6 +19,7 @@ nav { .content { margin-left: 180px; padding: 30px; + margin-right: 20px; } form input { @@ -31,4 +32,33 @@ form input { outline: none; width: 450px; display: block; +} + +ul { + padding-left: 0; +} + +.mail { + background-color: #fff; + list-style: none; + margin: 0; + margin-bottom: 15px; + padding: 10px 15px; + box-shadow: 0 1px 5px #ddd; + border-radius: 5px; +} + +.mail-content { + margin: 5px 0 0 0; + color: #aaa; +} + +.email { + color: #674dd4; +} + +hr { + border: none; + height: 1px; + background-color: #eee; } \ No newline at end of file From 6af89908f2b2d12ea803f665e6db2a73d86ea5a8 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 23:08:16 -0600 Subject: [PATCH 09/26] =?UTF-8?q?Clase=20237.=20Creando=20botones=20de=20n?= =?UTF-8?q?avegaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/style.css | 20 ++++++++++++++++++++ app/templates/base.html | 1 + app/templates/mail/index.html | 5 +++++ 3 files changed, 26 insertions(+) diff --git a/app/static/style.css b/app/static/style.css index 1d11b9f..cb89f15 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -22,6 +22,11 @@ nav { margin-right: 20px; } +.top-bar { + display: flex; + justify-content: space-between; +} + form input { font-family: 'Raleway', sans-serif; border: 0; @@ -57,6 +62,21 @@ ul { color: #674dd4; } +.button { + font-size: 14px; + transition: background-color 0.5s ease; + background-color: #674dd4; + color: #fff; + align-self: center; + padding: 10px 15px; + border-radius: 30px; + text-decoration: none; +} + +.button:hover { + background-color: #7b62e3; +} + hr { border: none; height: 1px; diff --git a/app/templates/base.html b/app/templates/base.html index 7483403..8fe36ba 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -12,6 +12,7 @@
+ {% block action %}{% endblock %}
{% block header %}{% endblock %} diff --git a/app/templates/mail/index.html b/app/templates/mail/index.html index ff7ddde..4fcc863 100644 --- a/app/templates/mail/index.html +++ b/app/templates/mail/index.html @@ -4,6 +4,11 @@

{% block title %} Correos Enviados {% endblock %}

{% endblock %} + +{% block action %} +Nuevo Correo +{% endblock %} + {% block content %}
    {% for mail in mails %} From abff24c011bf6af3e1f2b095985a782fdff63581 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 23:27:27 -0600 Subject: [PATCH 10/26] Clase 238. Agregando ruta para crear emails --- app/__pycache__/mail.cpython-38.pyc | Bin 590 -> 740 bytes app/mail.py | 3 +++ app/templates/mail/create.html | 25 +++++++++++++++++++++++++ app/templates/mail/index.html | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 app/templates/mail/create.html diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc index fa0b5fb707bd927ebff6523fed21439950f05cee..a5516c514628513aba07fe409ad9033f99db20aa 100644 GIT binary patch delta 190 zcmX@d@`RN)l$V!_0SNg2)g|wn$ScbjHBsAHCY3FVJ%uZUErq?8DTOQs!I-@$Scd}GEv)^ErlzXL6du9R{Volver +{% endblock %} + +{% block header %} +

    {% block title %} Enviar correo {% endblock %}

    +{% endblock %} + +{% block content %} +
    +
    + + + + + + +
    +
    + +
    +
    +{% endblock %} \ No newline at end of file diff --git a/app/templates/mail/index.html b/app/templates/mail/index.html index 4fcc863..eb24223 100644 --- a/app/templates/mail/index.html +++ b/app/templates/mail/index.html @@ -6,7 +6,7 @@

    {% block title %} Correos Enviados {% endblock %}

    {% block action %} -Nuevo Correo +Nuevo Correo {% endblock %} {% block content %} From a78884dc6ea82c9c8d2d94f3eeda2ef1c9e01c11 Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 23 Nov 2022 23:33:08 -0600 Subject: [PATCH 11/26] Clase 239. Agregando estilo al formulario de correo --- app/static/style.css | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/app/static/style.css b/app/static/style.css index cb89f15..bdf3dd5 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -71,6 +71,7 @@ ul { padding: 10px 15px; border-radius: 30px; text-decoration: none; + border: none; } .button:hover { @@ -81,4 +82,27 @@ hr { border: none; height: 1px; background-color: #eee; +} + +textarea { + font-family: 'Raleway', sans-serif; + border: 0; + height: 250px; + padding: 10px 15px; + border-radius: 30px; + box-shadow: 0 1px 5px #ddd; + resize: none; + width: 450px; + display: block; + outline: none; +} + +.form-group { + margin-bottom: 15px; +} + +form label { + display: inline-block; + margin-left: 10px; + margin-bottom: 10px; } \ No newline at end of file From 383d1b5eb8fd2f131ff0f78c06953f787c2b8bf8 Mon Sep 17 00:00:00 2001 From: onedrako Date: Thu, 24 Nov 2022 10:55:02 -0600 Subject: [PATCH 12/26] Clase 240. Validando los datos del formulario. --- .env | 1 + app/__pycache__/mail.cpython-38.pyc | Bin 740 -> 1126 bytes app/mail.py | 23 ++++++++++++++++++++++- app/static/style.css | 9 +++++++++ app/templates/mail/create.html | 6 +++--- 5 files changed, 35 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 7bf855c..f921424 100644 --- a/.env +++ b/.env @@ -2,3 +2,4 @@ FLASK_DATABASE_HOST=localhost FLASK_DATABASE_PASSWORD=chamaco95 FLASK_DATABASE_USER=root FLASK_DATABASE=mailerapp +SECRET_KEY=misecreto diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc index a5516c514628513aba07fe409ad9033f99db20aa..71d390ce6a9deb213ad107ab319968982806bb3a 100644 GIT binary patch literal 1126 zcmZWo&2AGh5cbdhWt+5BODV^Q6XDRj074ZdAS6f;DVL~dwOPAO()~$ouhd2xaR>)4 zm3RZ%Bd_EG7f!rFPmH|*6>#M7%-HMs{LPp5tyYL&eE<3}2_1xfnBeYkA=rm0M_?FY zI7JyA;*1PQMu#+Wh7LA)lDe5U^f2O>QSLK`xmR=;@L<{i-(&t2VF7D=LQ6ahZ8ltG z*I3hL*H~+SI_p274(d3%@hmO*OiXg6Hw4ca7m?!GER7Y{zToF2mrA=QX)MPbti4mN zA~w=a7EjV!+=WzFiZq%Deloe}5KUk9jM|e;``}~3@B|IoN;VK!&X(|kg4%GzSf)mk#=o=DSu-v}tj*Ejo|Q-AB8{W0%vsSj<+zAvv#yyY+M8W!*J29bR%r|( zAr5gs#69rmem4;uSpJI~BZEKWe1SlrDNu4o#AooxHP8X{n5^+B_;}?zhPG3*pcRt) z6}<*w++d6b2Z=Tndi5;Y!{<+avG~bOp3kv?w~&S|HeW6 z;lCRK8ONPD%mv~yC3OjFRM_JDg(u%;=`g<(>=R@im3U9kfxao?C- zdjl7u5E5QuR@?mAY}?(sJDcFkhhPv5ant@B;y@c$lQc0Q0S;jmZ8+8MH0yuMnII6_ z(iX4M@hH+{G}EpqK%!O~_NF_4j4p*m6+FobR;K)^AxAdBJaC$1 K9dLzyll%fSKO7eT delta 350 zcmZvWy-ve06oq{qCvnpxP0LiND?^s@0u>8;7sTQ%^qTVHh{_2|2N=rQA#0Bo*CFi#47VI5_8!>=l$l%hONyT+W-PN%OV?(XQc8 z_6fZ(o3+odgi$--;|G`GG$%BbB&q378=wY0UuR`;WsVkB7qy;V)}_h8dX%x*Um23! z2R}J?RJlgR?E&dLkM{nBDXJUmXm?))#cDOhb1T}R7|%wIyX?Qca#r5rozcfYi7F<^ MM9fo&Aqr#o2Fp@IU;qFB diff --git a/app/mail.py b/app/mail.py index bd78350..5150f72 100644 --- a/app/mail.py +++ b/app/mail.py @@ -1,5 +1,5 @@ from flask import ( - Blueprint, render_template + Blueprint, render_template, request, flash ) from app.db import get_db @@ -14,5 +14,26 @@ def index(): return render_template('mail/index.html', mails=mails) @bp.route("/create", methods=('GET', 'POST')) + def create(): + if request.method == 'POST': + email = request.form.get("email") + subject = request.form.get("subject") + content = request.form.get("content") + errors = [] + + if not email: + errors.append("Email es obligatorio.") + if not subject: + errors.append("Subject es obligatorio.") + if not content: + errors.append("Content es obligatorio.") + + if len(errors) == 0: + pass + else: + for error in errors: + flash(error) + + print (email, subject, content) return render_template('mail/create.html') diff --git a/app/static/style.css b/app/static/style.css index bdf3dd5..1bea30e 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -105,4 +105,13 @@ form label { display: inline-block; margin-left: 10px; margin-bottom: 10px; +} + +.flash { + background-color: red; + color: white; + padding: 15px; + border-radius: 5px; + border: 1px solid rgba(0, 0, 0, 0.1); + margin: 10px 0; } \ No newline at end of file diff --git a/app/templates/mail/create.html b/app/templates/mail/create.html index 952af7e..3facc0f 100644 --- a/app/templates/mail/create.html +++ b/app/templates/mail/create.html @@ -12,11 +12,11 @@

    {% block title %} Enviar correo {% endblock %}

    - + - + - +
    From ff6ee6fd6082f12b5cb36dc170d6f68c6e5f2b2f Mon Sep 17 00:00:00 2001 From: onedrako Date: Thu, 24 Nov 2022 11:09:34 -0600 Subject: [PATCH 13/26] Clase 241. Insertando valores --- .gitignore | 2 +- app/__pycache__/__init__.cpython-38.pyc | Bin 797 -> 797 bytes app/__pycache__/db.cpython-38.pyc | Bin 1452 -> 1452 bytes app/__pycache__/mail.cpython-38.pyc | Bin 1126 -> 1546 bytes app/__pycache__/schema.cpython-38.pyc | Bin 381 -> 381 bytes app/mail.py | 26 +++++++++++++++++------- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b8a1259..2d19ec7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ venv -env \ No newline at end of file +.env \ No newline at end of file diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc index 24602e1912295d5459be83a953b701ecb06b2681..d101f8a8853976c01c2fc5885d7fdd19dfbe4225 100644 GIT binary patch delta 20 acmbQsHkXY%l$V!_0SJC9tl!8j#0&s0(FC*r delta 20 acmbQsHkXY%l$V!_0SJ!VtJ}ye#0&s0&IG&w diff --git a/app/__pycache__/db.cpython-38.pyc b/app/__pycache__/db.cpython-38.pyc index 515ed8d3a2d2a28df9647684a16250a67e6d25a5..fb301009d2551c5bfc5dae93c6cd1b03e824ec13 100644 GIT binary patch delta 20 acmZ3(y@s1Rl$V!_0SJC9tl!AJkQD$k-vw;| delta 20 acmZ3(y@s1Rl$V!_0SIja`=*_EtK>h&1f5A(Av#nH|<-Psp+xPa(_wD|q@9fNWI&C3XXP?H6 zi80OG#$tLu&jZ6V0@E`wVu+DWBA_0{h-0SlB-5F3ta%o$XQ|_I<;m`OuwID8Xe*#nuW42 zNGwF3@%FqrW=K^hv9N_H5sOil|vhXATeQe#cpkZv`hD?6*K#!D;lml6R%+yjb1XE>)f7 zrLf>!gnMYIo)y2#_?yF=!VemP*Ck(hC4-Kei8i!*V`olxCsC3q#RH zU-(@qG{9~`+)(^YmGbJL$%W{NP+U{Yykd-)5etfl)AhLSVz8!`VtTF-@3XtrXlaL1K~4ot_o-!5EK?WKDatdH3mWesMY&@ zZo-ZnCvHH0ApD9<)(nmp$4LbZWhT1R#$3#8F;gMr`|=mT`Ea}@%D7xm26yIf}`<9qYXq8O#>d< zo(;qYZTXI7n%`TV@I}9X+}6%L)j}6;$Ot@{t8%6mwaV3^E*%iJ{FynpY&_WUb1D1>9TcNtAw4CVCL04j>Et$ zq+izhb!Ii?Lvu2SjfLFhW*&>FXRwepZQqzP6HR$uO*L!eP|LeN>sOFRs|duBpz^~g z!*|Y-Dxg$=#A;S>s^zLF?**OohS#NMcZS2JJ~DRt%p2R;zvM&zy#5Tuc6g>Q0)Gc^ PEK&%IOwlr0N=MOen>%2d diff --git a/app/__pycache__/schema.cpython-38.pyc b/app/__pycache__/schema.cpython-38.pyc index dc5331ff8722c7eed0d7d935e5c78be74f04db15..af2e21a7e29c71ece03e31514022346785c8b188 100644 GIT binary patch delta 20 acmey%^p}Y{l$V!_0SJC9tl!98#0UUBKLyGF delta 20 acmey%^p}Y{l$V!_0SIbt)NSN0Vgvv@AO(Z~ diff --git a/app/mail.py b/app/mail.py index 5150f72..cbde101 100644 --- a/app/mail.py +++ b/app/mail.py @@ -1,10 +1,12 @@ from flask import ( - Blueprint, render_template, request, flash - ) + Blueprint, render_template, request, flash, redirect, url_for +) from app.db import get_db bp = Blueprint('mail', __name__, url_prefix='/') + + @bp.route("/", methods=('GET', 'POST')) def index(): db, c = get_db() @@ -13,8 +15,8 @@ def index(): return render_template('mail/index.html', mails=mails) -@bp.route("/create", methods=('GET', 'POST')) +@bp.route("/create", methods=('GET', 'POST')) def create(): if request.method == 'POST': email = request.form.get("email") @@ -30,10 +32,20 @@ def create(): errors.append("Content es obligatorio.") if len(errors) == 0: - pass + db, c = get_db() + c.execute('INSERT INTO email (email, subject, content) VALUES (%s, %s, %s)', + (email, subject, content)) + db.commit() + + return redirect(url_for('mail.index')) else: - for error in errors: - flash(error) + for error in errors: + flash(error) - print (email, subject, content) + print(email, subject, content) return render_template('mail/create.html') + + +def send(to, subject, content): + sg = sendgrid.SendGridAPIClient( + api_key=current_app.config['SENDGRID_API_KEY']) From 4c2d8c216b6dddf7e342f104a84bf520fbe64b30 Mon Sep 17 00:00:00 2001 From: onedrako Date: Thu, 24 Nov 2022 12:01:58 -0600 Subject: [PATCH 14/26] Clase 242. Enviando correos con sendgrid --- .env | 2 ++ app/__init__.py | 4 +++- app/__pycache__/__init__.cpython-38.pyc | Bin 797 -> 826 bytes app/__pycache__/mail.cpython-38.pyc | Bin 1546 -> 1849 bytes app/mail.py | 14 +++++++++++--- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.env b/.env index f921424..7c0b3c4 100644 --- a/.env +++ b/.env @@ -3,3 +3,5 @@ FLASK_DATABASE_PASSWORD=chamaco95 FLASK_DATABASE_USER=root FLASK_DATABASE=mailerapp SECRET_KEY=misecreto +SENDGRID_API_KEY=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 +FROM_EMAIL=gabrielhv@onedrako.com \ No newline at end of file diff --git a/app/__init__.py b/app/__init__.py index 3d844fe..92709e9 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -2,9 +2,11 @@ from flask import Flask + def create_app(): app = Flask(__name__) app.config.from_mapping( + FROM_EMAIL=os.environ.get('FROM_EMAIL'), SENDGRID_KEY=os.environ.get('SENDGRID_API_KEY'), SECRET_KEY=os.environ.get('SECRET_KEY'), DATABASE_HOST=os.environ.get('FLASK_DATABASE_HOST'), @@ -17,5 +19,5 @@ def create_app(): db.init_app(app) from . import mail app.register_blueprint(mail.bp) - + return app diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc index d101f8a8853976c01c2fc5885d7fdd19dfbe4225..4a670c6bfdc39320e022e873acff3f43b9dd121c 100644 GIT binary patch delta 284 zcmbQswu_B7l$V!_0SIc=)hCxv+cmO?WpXQHuK*iJf+I68vm`#TprD9-vJ#UrFG#S69Z0NX zC=!|+#1xkg5-FAg5)6zSjBJct$nYl{7Y~rn!^p!_Bmz{S$x_4(q;9dMZ_Fgtdh7^tz&K&k!j#@@W zh8o5NoHYy!fh?dX*Tj#KOx%8xB^ZkY*`j!YUHx3#gFId0y=j@I8WqKn znU`4-pIA^(#5UQMNtqWUSi}Y-Rx%U`PR?bDV*`m4%S^t=Bx3oCjgyCwi;;(shp9*y kD6Gj+1ajdm*0h|&;_Mr#Ihw`X%}^jvsb9 zA;IV0SBv4_-ckJF;%D>}QIHbpW}3nSH?x#xOtOqio(U;3PkNaz{Vb3{){-r79G-?* zTeg8{ri6}^r~E@EJGwK8aUH1EAyuJjKPO9&D-9Z*qa77D=mm9kMO}DKjFq<8{{sY45H@Mv8NK05v)ou+#vx?qJV!G8SJiHj8 zQv_%T4IzYpnk&`k^hSJ&h$RzHuusij)rdZR^1^y0DWRlG2E_VH@&ldoxhTak=6<#_ zVkZ5*WlsEq$k|BB-IaQ%Co=b~bO{yR+H9yY+nn(jUym{eAtc4!^ng-FAO# z`|CU3{uEmMqy21_4#rcYL`FY7(1q>q=IU7z*MZZ0uUZ$~g=t~tPWb6)yeGw0HW;Up zKFFniE1z2IHp#aULPk19&$N+lK6YpLEHA9N=KSkulAxwGe^(eui#-{ROrG_16Ev{- z*{X?A2SyjO{L!?~|Ep9J{R@m(#ApbtK@3;}v|VWSk~NdyhP>3=!i?3%6P?bqDK^}9 zYB5R&#eVgx=&hgikh`Ju@Tb{OyC$q&iQeri2sIUL0=}2PyM767X1O{@^_PI$!nJ3B PX?(&X8Z&H=0LQhrVV3c! delta 825 zcmZ8fL2J}N7@coslFVka+1l1>K~X4(0V#MFMQkZWSfoo29a_RRGrMlP*=(rhdzgWX zJy0uJ5}7Ff4yp^&KhrZ=(qIBh@c|LAtUvY)CPW}@khIFV_Ihh=V{3CQeEMQDe7?RD z0Czg$et0O~1eCKx4nX3ilb`>Uj6pzHwKt2YoO?(Y^sfT^yfy?x~{Tq^yv#$UE diff --git a/app/mail.py b/app/mail.py index cbde101..625ceec 100644 --- a/app/mail.py +++ b/app/mail.py @@ -1,5 +1,7 @@ +import sendgrid +from sendgrid.helpers.mail import * from flask import ( - Blueprint, render_template, request, flash, redirect, url_for + Blueprint, render_template, request, flash, redirect, url_for, current_app ) from app.db import get_db @@ -32,6 +34,7 @@ def create(): errors.append("Content es obligatorio.") if len(errors) == 0: + send(email, subject, content) db, c = get_db() c.execute('INSERT INTO email (email, subject, content) VALUES (%s, %s, %s)', (email, subject, content)) @@ -47,5 +50,10 @@ def create(): def send(to, subject, content): - sg = sendgrid.SendGridAPIClient( - api_key=current_app.config['SENDGRID_API_KEY']) + sg = sendgrid.SendGridAPIClient(api_key=current_app.config['SENDGRID_KEY']) + from_email = Email(current_app.config['FROM_EMAIL']) + to_email = To(to) + content = Content("text/plain", content) + mail = Mail(from_email, to_email, subject, content) + response = sg.client.mail.send.post(request_body=mail.get()) + print(response) From 9b6b0c82076c4a5ee69dbe933aa0b2e05d4e9ad4 Mon Sep 17 00:00:00 2001 From: onedrako Date: Thu, 24 Nov 2022 12:17:53 -0600 Subject: [PATCH 15/26] =?UTF-8?q?Clase=20243.=20Agregando=20b=C3=BAqueda?= =?UTF-8?q?=20a=20nuestra=20aplicaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/__pycache__/mail.cpython-38.pyc | Bin 1849 -> 1980 bytes app/mail.py | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc index 63f0b4680d8b5b27acf9827c77643f430ed211cc..2d42c4835fb7e4d932f6aeabbeb16d6661e96c02 100644 GIT binary patch delta 581 zcmY*VO=}cE5bf&e`C!>hNTM6FiP;g2&`FF34|?+u#t)1Jl86|*jMJUn=wx=O=|BiO z?7^dWnzOKb^e7QT@P7#XC&a6l*gbkM4fUw^UR76De+$1)htH>`8pNFQFQfFM|2cdJ zBW9>;V$(#iXF!oRFs1?~P!i?5Bd=%)B^?q$-Uhfjq+=$i@tnL>=Z;`QGEW4XCkHU0 zrDIfgLP|$@!W}xo`#^UI_n&F6kO`)})4APvE8g6TR-*?y+fS=8_#=KnisVspm_;uh z#XE77_H!k36>U9!5=Se=Z&*2mS%Td{J6);JZmWHH zBGY3fb#Ne6+Dozw?be*(jJ0VfUTa8k&X7+8+tn}FZ(lNm&?Yn>fF@-?N%Nf10C4H- zCH(;%ylh*&WH6Aq&`u_E%?gv&6R}loGk*W7DZyn6ow`^e_OZY#R#~u$TPxVMLJf;` zU5YYMa-sUl?gBsi$rj<-4QsGLzfkpHylFTOG*$h71FALe)}4zNp>4Wnq6iHTn1#?R l(=gbA+T*jhUcL9aoh4%7OO5(ry>?bwFYTY69F=Id z+3`jR$*oS$rNhlO>v{xnT}nRDK)Ul79a86pQEpz-Rpzvto(J*-qH^qBapb_Fs2&x_ zgl&9bo1###g)C%Z$j#sJ8!B?OMHx4mg8}WiT=i&=YraS$14xFi8rfSGW3VET7vKg3 z=z|X_sidW%M+#)55Fs1&IY66?ro&x*2UX{w=TW&VKeR#LXHbyc6#-&$%=*6u;mp`b p{a*xfXgmBgvZl;P5=dyrTE(1PP?eDKANQXV!uwc7Hy4mq_y*sFWaj_? diff --git a/app/mail.py b/app/mail.py index 625ceec..6953076 100644 --- a/app/mail.py +++ b/app/mail.py @@ -11,10 +11,14 @@ @bp.route("/", methods=('GET', 'POST')) def index(): + search = request.args.get('search') db, c = get_db() - mails = c.execute('SELECT * FROM email') + if search is None: + mails = c.execute('SELECT * FROM email') + else: + mails = c.execute( + 'SELECT * FROM email WHERE content LIKE %s', ('%'+search+'%',)) mails = c.fetchall() - return render_template('mail/index.html', mails=mails) From ee496f77c13f4ca12bcfcf6ccc942c1ddef4a502 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 16:35:01 -0600 Subject: [PATCH 16/26] Obteniendo los requerimentos para subir la app ultimos cambios --- .gitignore | 9 ++- Procfile | 1 + requirements.txt | 168 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 Procfile create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 2d19ec7..c98fd57 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ -venv -.env \ No newline at end of file +venv/ +.env + +*.pyc +__pycache__/ + +instance \ No newline at end of file diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..01ae373 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: flask init-db; gunicorn app:'create_app()' diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6616ee3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,168 @@ +altgraph==0.17.3 +appdirs==1.4.4 +argon2-cffi==20.1.0 +astroid==2.9.3 +async-generator==1.10 +attrs==19.3.0 +Automat==0.8.0 +backcall==0.2.0 +bcrypt==4.0.1 +bleach==3.3.0 +blinker==1.4 +cached-property==1.5.1 +camelcase==0.2 +certifi==2019.11.28 +cffi==1.14.5 +chardet==3.0.4 +charset-normalizer==2.1.1 +cliapp==1.20180812.1 +Click==7.0 +cloud-init==22.4.2 +colorama==0.4.3 +command-not-found==0.3 +configobj==5.0.6 +constantly==15.1.0 +cryptography==2.8 +cycler==0.10.0 +dbus-python==1.2.16 +decorator==5.0.9 +defusedxml==0.7.1 +distlib==0.3.2 +distro==1.8.0 +distro-info===0.23ubuntu1 +docker==6.0.0 +docker-compose==1.29.2 +dockerpty==0.4.1 +docopt==0.6.2 +entrypoints==0.3 +filelock==3.0.12 +gunicorn==20.1.0 +httplib2==0.14.0 +hyperlink==19.0.0 +idna==2.8 +importlib-metadata==1.5.0 +incremental==16.10.1 +install==1.3.4 +ipykernel==5.5.5 +ipython==7.24.1 +ipython-genutils==0.2.0 +ipywidgets==7.6.3 +isort==5.10.1 +jedi==0.18.0 +Jinja2==2.10.1 +joblib==1.0.1 +jsonpatch==1.22 +jsonpointer==2.0 +jsonschema==3.2.0 +jupyter==1.0.0 +jupyter-client==6.1.12 +jupyter-console==6.4.0 +jupyter-core==4.7.1 +jupyterlab-pygments==0.1.2 +jupyterlab-widgets==1.0.0 +keyring==18.0.1 +kiwisolver==1.3.1 +language-selector==0.1 +launchpadlib==1.10.13 +lazr.restfulclient==0.14.2 +lazr.uri==1.0.3 +lazy-object-proxy==1.7.1 +Markdown==3.1.1 +MarkupSafe==1.1.0 +matplotlib==3.4.2 +matplotlib-inline==0.1.2 +mccabe==0.6.1 +mistune==0.8.4 +more-itertools==4.2.0 +mpmath==1.2.1 +mysql-connector-python==8.0.31 +nbclient==0.5.3 +nbconvert==6.0.7 +nbformat==5.1.3 +nest-asyncio==1.5.1 +netifaces==0.10.4 +nose==1.3.7 +notebook==6.4.0 +numpy==1.20.3 +oauthlib==3.1.0 +olefile==0.46 +packaging==20.9 +pandas==1.2.4 +pandocfilters==1.4.3 +paramiko==2.11.0 +parso==0.8.2 +pbr==5.6.0 +pexpect==4.6.0 +pickleshare==0.7.5 +Pillow==8.2.0 +platformdirs==2.4.1 +prometheus-client==0.11.0 +prompt-toolkit==3.0.18 +protobuf==3.20.1 +ptyprocess==0.7.0 +pyasn1==0.4.2 +pyasn1-modules==0.2.1 +pycairo==1.16.2 +pycparser==2.20 +Pygments==2.9.0 +PyGObject==3.36.0 +PyHamcrest==1.9.0 +pyinstaller==5.6.2 +pyinstaller-hooks-contrib==2022.13 +PyJWT==1.7.1 +pylint==2.12.2 +pymacaroons==0.13.0 +PyNaCl==1.3.0 +pyOpenSSL==19.0.0 +pyparsing==2.4.7 +pyrsistent==0.15.5 +pyserial==3.4 +python-apt==2.0.0+ubuntu0.20.4.8 +python-dateutil==2.8.1 +python-debian===0.1.36ubuntu1 +python-dotenv==0.21.0 +pytz==2021.1 +PyYAML==5.3.1 +pyzmq==22.1.0 +qtconsole==5.1.0 +QtPy==1.9.0 +requests==2.28.1 +requests-unixsocket==0.2.0 +scikit-learn==0.24.2 +scipy==1.6.3 +SecretStorage==2.3.1 +Send2Trash==1.5.0 +service-identity==18.1.0 +simplejson==3.16.0 +six==1.14.0 +sos==4.4 +ssh-import-id==5.10 +stevedore==3.3.0 +sympy==1.8 +systemd-python==234 +terminado==0.10.1 +testpath==0.5.0 +texttable==1.6.4 +threadpoolctl==2.1.0 +toml==0.10.2 +tornado==6.1 +traitlets==5.0.5 +ttystatus==0.38 +Twisted==18.9.0 +typing-extensions==4.0.1 +ubuntu-advantage-tools==27.12 +ufw==0.36 +unattended-upgrades==0.1 +urllib3==1.26.12 +virtualenv==20.4.7 +virtualenv-clone==0.5.4 +virtualenvwrapper==4.8.4 +wadllib==1.3.3 +wcwidth==0.2.5 +webencodings==0.5.1 +websocket-client==0.59.0 +widgetsnbextension==3.5.1 +wrapt==1.13.3 +xlrd==2.0.1 +zipp==1.0.0 +zope.interface==4.7.1 From 3db0748b878551855808754a23823c5c5c9f69fb Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 17:38:06 -0600 Subject: [PATCH 17/26] cambiando Procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 01ae373..3b2c138 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: flask init-db; gunicorn app:'create_app()' +web: flask init-db; gunicorn main:app From f2ba9dc44f677e52da672d75abd9eca29f950942 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 17:44:12 -0600 Subject: [PATCH 18/26] regresando procfile --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 3b2c138..7cfa4dd 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: flask init-db; gunicorn main:app +web: flask init-db; gunicorn app:'create_app()' \ No newline at end of file From 1f1ad9d385378707d903096993a3354761f2fab2 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 17:45:14 -0600 Subject: [PATCH 19/26] cambiando archivos --- Procfile | 2 +- app/__init__.py => __init__.py | 0 app/db.py => db.py | 0 app/mail.py => mail.py | 0 app/schema.py => schema.py | 0 {app/static => static}/style.css | 0 {app/templates => templates}/base.html | 0 {app/templates => templates}/mail/create.html | 0 {app/templates => templates}/mail/index.html | 0 9 files changed, 1 insertion(+), 1 deletion(-) rename app/__init__.py => __init__.py (100%) rename app/db.py => db.py (100%) rename app/mail.py => mail.py (100%) rename app/schema.py => schema.py (100%) rename {app/static => static}/style.css (100%) rename {app/templates => templates}/base.html (100%) rename {app/templates => templates}/mail/create.html (100%) rename {app/templates => templates}/mail/index.html (100%) diff --git a/Procfile b/Procfile index 7cfa4dd..d6fc008 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: flask init-db; gunicorn app:'create_app()' \ No newline at end of file +web: flask init-db; gunicorn __init__.py:'create_app()' \ No newline at end of file diff --git a/app/__init__.py b/__init__.py similarity index 100% rename from app/__init__.py rename to __init__.py diff --git a/app/db.py b/db.py similarity index 100% rename from app/db.py rename to db.py diff --git a/app/mail.py b/mail.py similarity index 100% rename from app/mail.py rename to mail.py diff --git a/app/schema.py b/schema.py similarity index 100% rename from app/schema.py rename to schema.py diff --git a/app/static/style.css b/static/style.css similarity index 100% rename from app/static/style.css rename to static/style.css diff --git a/app/templates/base.html b/templates/base.html similarity index 100% rename from app/templates/base.html rename to templates/base.html diff --git a/app/templates/mail/create.html b/templates/mail/create.html similarity index 100% rename from app/templates/mail/create.html rename to templates/mail/create.html diff --git a/app/templates/mail/index.html b/templates/mail/index.html similarity index 100% rename from app/templates/mail/index.html rename to templates/mail/index.html From f88aab7467188f8a007404571d8cde06e91ac38c Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 17:56:34 -0600 Subject: [PATCH 20/26] cambiando archivos --- Procfile | 2 +- __init__.py => app/__init__.py | 0 db.py => app/db.py | 0 mail.py => app/mail.py | 0 schema.py => app/schema.py | 0 {static => app/static}/style.css | 0 {templates => app/templates}/base.html | 0 {templates => app/templates}/mail/create.html | 0 {templates => app/templates}/mail/index.html | 0 9 files changed, 1 insertion(+), 1 deletion(-) rename __init__.py => app/__init__.py (100%) rename db.py => app/db.py (100%) rename mail.py => app/mail.py (100%) rename schema.py => app/schema.py (100%) rename {static => app/static}/style.css (100%) rename {templates => app/templates}/base.html (100%) rename {templates => app/templates}/mail/create.html (100%) rename {templates => app/templates}/mail/index.html (100%) diff --git a/Procfile b/Procfile index d6fc008..38e68e7 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: flask init-db; gunicorn __init__.py:'create_app()' \ No newline at end of file +web: flask init-db; gunicorn app:'app' diff --git a/__init__.py b/app/__init__.py similarity index 100% rename from __init__.py rename to app/__init__.py diff --git a/db.py b/app/db.py similarity index 100% rename from db.py rename to app/db.py diff --git a/mail.py b/app/mail.py similarity index 100% rename from mail.py rename to app/mail.py diff --git a/schema.py b/app/schema.py similarity index 100% rename from schema.py rename to app/schema.py diff --git a/static/style.css b/app/static/style.css similarity index 100% rename from static/style.css rename to app/static/style.css diff --git a/templates/base.html b/app/templates/base.html similarity index 100% rename from templates/base.html rename to app/templates/base.html diff --git a/templates/mail/create.html b/app/templates/mail/create.html similarity index 100% rename from templates/mail/create.html rename to app/templates/mail/create.html diff --git a/templates/mail/index.html b/app/templates/mail/index.html similarity index 100% rename from templates/mail/index.html rename to app/templates/mail/index.html From fc281fa1e60d83cab8d064d1e409f5f7c0a303d8 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 21:24:20 -0600 Subject: [PATCH 21/26] Agregado port --- .env | 17 ++++++++++++----- app/__init__.py | 1 + app/__pycache__/__init__.cpython-38.pyc | Bin 826 -> 885 bytes app/__pycache__/db.cpython-38.pyc | Bin 1452 -> 1494 bytes app/__pycache__/mail.cpython-38.pyc | Bin 1980 -> 1991 bytes app/__pycache__/schema.cpython-38.pyc | Bin 381 -> 392 bytes app/db.py | 1 + 7 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 7c0b3c4..95ffe9f 100644 --- a/.env +++ b/.env @@ -1,7 +1,14 @@ -FLASK_DATABASE_HOST=localhost -FLASK_DATABASE_PASSWORD=chamaco95 -FLASK_DATABASE_USER=root -FLASK_DATABASE=mailerapp +# FLASK_DATABASE_HOST=localhost +# FLASK_DATABASE_PASSWORD=chamaco95 +# FLASK_DATABASE_USER=root +# FLASK_DATABASE=mailerapp SECRET_KEY=misecreto SENDGRID_API_KEY=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 -FROM_EMAIL=gabrielhv@onedrako.com \ No newline at end of file +FROM_EMAIL=gabrielhv@onedrako.com + + +FLASK_DATABASE_HOST=containers-us-west-52.railway.app +FLASK_DATABASE_PASSWORD=Dho8qTGt9KunCjm4xOZc +FLASK_DATABASE_USER=root +FLASK_DATABASE=railway +FLASK_DATABASE_PORT=7318 \ No newline at end of file diff --git a/app/__init__.py b/app/__init__.py index 92709e9..06ec17a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -13,6 +13,7 @@ def create_app(): DATABASE_PASSWORD=os.environ.get('FLASK_DATABASE_PASSWORD'), DATABASE_USER=os.environ.get('FLASK_DATABASE_USER'), DATABASE=os.environ.get('FLASK_DATABASE'), + DATABASE_PORT=os.environ.get('FLASK_DATABASE_PORT'), ) from . import db diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc index 4a670c6bfdc39320e022e873acff3f43b9dd121c..902cb1548f3188f08e77209adf8c3cf9c2208bed 100644 GIT binary patch delta 173 zcmdnR_LYq{l$V!_0SI1fS)IIPB5yJmH<05D#KqGlR)uSouw=0=U`ydx$e6;}%fZNy z!j;0E!=B4g%gD%3!?=L6hG8L)1r+6(_)(IPcQQ9)op_Y6n~!6#cf5;Zh@+EZuxosP ze^7`f$K-CtVE!mx6w%4|7$-AEOfF(F;Vw>1PR`8Fi#IljpS+Aoi&0_nMJ6#;My?-h K+>>811pojtI4=(X delta 129 zcmey$wu_B7l$V!_0SIc=)hCxv8S%5Z>|6da=(U5ebCTA^8*u;)Wumq~L%^R6vr0;)G<5T?c$g?9+G=Df0p; z&^EjSw2^ociWLvQGXMp%z5`-wK52fw@0*=3$+skZk)|=D@72X;`Tb-1V?Cne5k)&8 zP@vgSgilQjx9{p;7Ak&|spve^tl*l>_$*RFT{)+*Lb#kl9C`;VkIhSXuxiuCqw(nB z=wP>a{%n7ohvpMx+y?UowfPEr$#pV82S4}Cnzxg*rIb}u7x#7w^Tf;gYt&*OfKx30 zUm{uo+%RX}+x#CLZ_u0-^0;ZsLcMXcmUrBqCjbX##orrmPyt=lM&)TK-|KS1Wpi>; z>D)*6Zd`XwsJe|7(CJ21U1^f-Q@a%e3}TY)0cPgHf4!Sg#fI{@l1DZu<-6vRK(}J2 za&@UvIL~RVhQw+E0_JnTO*0AZAKs!Y5A8KwPEj=<>S8*d%cj=lsm1~ItWPdBnJV>H z1vec9tWT4dY!~xI<#88I+YW_Q4?XH4m4l$$rQ&9;T((f#ACr;VCS$a+A@2ACVPX9QAQie;roDX zid$?fHkTKX3P3=`%I*(QOF*k^CSKY90$RaWDe;0R?mGVE60(@56QCdxpf$EFb)d@b zC9BP6DfF{{=8$Q%e%Mb?y27O-lj0-UXWr`Q{ym-q<95^Fk(RRsjB#3@QKs delta 31 lcmX@kzlWbYl$V!_0SNwYso%(*$i(P5IhV;~^BN{;Rse?<2zUSh diff --git a/app/__pycache__/schema.cpython-38.pyc b/app/__pycache__/schema.cpython-38.pyc index af2e21a7e29c71ece03e31514022346785c8b188..614ea89808ffc7c96cb38e9f86a126e768b66d55 100644 GIT binary patch delta 42 wcmey%)WOUh%FD~e00hhGS8wFzXJibUEX`=bU7VVnoSB~&Z)_4j*`HAl0N^PL3IG5A delta 30 kcmeBR{>#K2%FD~e00ci4)^FtIXJquAEX`;#If_va0CIc>J^%m! diff --git a/app/db.py b/app/db.py index 1400882..adfe6b0 100644 --- a/app/db.py +++ b/app/db.py @@ -12,6 +12,7 @@ def get_db(): user=current_app.config["DATABASE_USER"], password=current_app.config["DATABASE_PASSWORD"], database=current_app.config["DATABASE"], + port=current_app.config["DATABASE_PORT"], ) g.c = g.db.cursor(dictionary=True) return g.db, g.c From 9faa4aba23f2e04de427824e286c55727263bf0e Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 21:41:02 -0600 Subject: [PATCH 22/26] Agregado requeriments.txt --- .gitignore | 3 +- app/__pycache__/db.cpython-38.pyc | Bin 1494 -> 1494 bytes requirements.txt | 177 ++---------------------------- 3 files changed, 14 insertions(+), 166 deletions(-) diff --git a/.gitignore b/.gitignore index c98fd57..356e18e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ venv/ .env *.pyc -__pycache__/ +__pycache__/* +app/__pycache__/* instance \ No newline at end of file diff --git a/app/__pycache__/db.cpython-38.pyc b/app/__pycache__/db.cpython-38.pyc index 856bc9c620a06c976116c00a185d7def4abc02f6..ae1f1d2391f050f7f0685f2231b1ff31f70d4a32 100644 GIT binary patch delta 265 zcmcb{eT{pA1d~VtpT4WrEDgDlc|(jYC&KrOep6H`*+lk;H;{2jpjL9n*io_TgfW%}Srdmdc$*Y*sxgi1|QSr$#%(9F! zldYHofpR^}io&8m;aiNEP)!gu2bkp;6(-+jPEb++$+9NrWF}|dVo6QT$VXBKHdTCb zB8w8E^5hm48%Ej52U(=`WI$S&fm&{HC#IytC+FwpCg!CSDFcNy8E-Ks78D?vAwHRl tRhm&_vKp&AqvB*YRwE+`pt>TE8AS>};ubry{vr*KIKnqj7p!8{0RTFOJO%&& diff --git a/requirements.txt b/requirements.txt index 6616ee3..986eaaf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,168 +1,15 @@ -altgraph==0.17.3 -appdirs==1.4.4 -argon2-cffi==20.1.0 -astroid==2.9.3 -async-generator==1.10 -attrs==19.3.0 -Automat==0.8.0 -backcall==0.2.0 -bcrypt==4.0.1 -bleach==3.3.0 -blinker==1.4 -cached-property==1.5.1 -camelcase==0.2 -certifi==2019.11.28 -cffi==1.14.5 -chardet==3.0.4 -charset-normalizer==2.1.1 -cliapp==1.20180812.1 -Click==7.0 -cloud-init==22.4.2 -colorama==0.4.3 -command-not-found==0.3 -configobj==5.0.6 -constantly==15.1.0 -cryptography==2.8 -cycler==0.10.0 -dbus-python==1.2.16 -decorator==5.0.9 -defusedxml==0.7.1 -distlib==0.3.2 -distro==1.8.0 -distro-info===0.23ubuntu1 -docker==6.0.0 -docker-compose==1.29.2 -dockerpty==0.4.1 -docopt==0.6.2 -entrypoints==0.3 -filelock==3.0.12 -gunicorn==20.1.0 -httplib2==0.14.0 -hyperlink==19.0.0 -idna==2.8 -importlib-metadata==1.5.0 -incremental==16.10.1 -install==1.3.4 -ipykernel==5.5.5 -ipython==7.24.1 -ipython-genutils==0.2.0 -ipywidgets==7.6.3 -isort==5.10.1 -jedi==0.18.0 -Jinja2==2.10.1 -joblib==1.0.1 -jsonpatch==1.22 -jsonpointer==2.0 -jsonschema==3.2.0 -jupyter==1.0.0 -jupyter-client==6.1.12 -jupyter-console==6.4.0 -jupyter-core==4.7.1 -jupyterlab-pygments==0.1.2 -jupyterlab-widgets==1.0.0 -keyring==18.0.1 -kiwisolver==1.3.1 -language-selector==0.1 -launchpadlib==1.10.13 -lazr.restfulclient==0.14.2 -lazr.uri==1.0.3 -lazy-object-proxy==1.7.1 -Markdown==3.1.1 -MarkupSafe==1.1.0 -matplotlib==3.4.2 -matplotlib-inline==0.1.2 -mccabe==0.6.1 -mistune==0.8.4 -more-itertools==4.2.0 -mpmath==1.2.1 +click==8.1.3 +Flask==2.2.2 +importlib-metadata==5.2.0 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.1 mysql-connector-python==8.0.31 -nbclient==0.5.3 -nbconvert==6.0.7 -nbformat==5.1.3 -nest-asyncio==1.5.1 -netifaces==0.10.4 -nose==1.3.7 -notebook==6.4.0 -numpy==1.20.3 -oauthlib==3.1.0 -olefile==0.46 -packaging==20.9 -pandas==1.2.4 -pandocfilters==1.4.3 -paramiko==2.11.0 -parso==0.8.2 -pbr==5.6.0 -pexpect==4.6.0 -pickleshare==0.7.5 -Pillow==8.2.0 -platformdirs==2.4.1 -prometheus-client==0.11.0 -prompt-toolkit==3.0.18 protobuf==3.20.1 -ptyprocess==0.7.0 -pyasn1==0.4.2 -pyasn1-modules==0.2.1 -pycairo==1.16.2 -pycparser==2.20 -Pygments==2.9.0 -PyGObject==3.36.0 -PyHamcrest==1.9.0 -pyinstaller==5.6.2 -pyinstaller-hooks-contrib==2022.13 -PyJWT==1.7.1 -pylint==2.12.2 -pymacaroons==0.13.0 -PyNaCl==1.3.0 -pyOpenSSL==19.0.0 -pyparsing==2.4.7 -pyrsistent==0.15.5 -pyserial==3.4 -python-apt==2.0.0+ubuntu0.20.4.8 -python-dateutil==2.8.1 -python-debian===0.1.36ubuntu1 python-dotenv==0.21.0 -pytz==2021.1 -PyYAML==5.3.1 -pyzmq==22.1.0 -qtconsole==5.1.0 -QtPy==1.9.0 -requests==2.28.1 -requests-unixsocket==0.2.0 -scikit-learn==0.24.2 -scipy==1.6.3 -SecretStorage==2.3.1 -Send2Trash==1.5.0 -service-identity==18.1.0 -simplejson==3.16.0 -six==1.14.0 -sos==4.4 -ssh-import-id==5.10 -stevedore==3.3.0 -sympy==1.8 -systemd-python==234 -terminado==0.10.1 -testpath==0.5.0 -texttable==1.6.4 -threadpoolctl==2.1.0 -toml==0.10.2 -tornado==6.1 -traitlets==5.0.5 -ttystatus==0.38 -Twisted==18.9.0 -typing-extensions==4.0.1 -ubuntu-advantage-tools==27.12 -ufw==0.36 -unattended-upgrades==0.1 -urllib3==1.26.12 -virtualenv==20.4.7 -virtualenv-clone==0.5.4 -virtualenvwrapper==4.8.4 -wadllib==1.3.3 -wcwidth==0.2.5 -webencodings==0.5.1 -websocket-client==0.59.0 -widgetsnbextension==3.5.1 -wrapt==1.13.3 -xlrd==2.0.1 -zipp==1.0.0 -zope.interface==4.7.1 +python-http-client==3.3.7 +sendgrid==6.9.7 +starkbank-ecdsa==2.2.0 +waitress==2.1.2 +Werkzeug==2.2.2 +zipp==3.11.0 From 006eaca829de142dc914cbe95cf01bd0c2ad2083 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 27 Dec 2022 21:53:26 -0600 Subject: [PATCH 23/26] procfile con creta_app --- Procfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 38e68e7..01ae373 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: flask init-db; gunicorn app:'app' +web: flask init-db; gunicorn app:'create_app()' From 98258be98280a8aa49aa8a6be67e631cb7831d7f Mon Sep 17 00:00:00 2001 From: onedrako Date: Wed, 28 Dec 2022 22:10:09 -0600 Subject: [PATCH 24/26] add requeriments gunicorn --- .gitignore | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 356e18e..97e30b7 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ venv/ .env *.pyc -__pycache__/* -app/__pycache__/* +__pycache__/ +app/__pycache__/ instance \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 986eaaf..5850edd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ click==8.1.3 Flask==2.2.2 +gunicorn==20.1.0 importlib-metadata==5.2.0 itsdangerous==2.1.2 Jinja2==3.1.2 From 80b489f317fb7430e39319e602ecc1f1a38132e0 Mon Sep 17 00:00:00 2001 From: onedrako Date: Tue, 5 Mar 2024 10:21:14 -0600 Subject: [PATCH 25/26] Agregada seccion 34 mailer a la rama main --- app/__pycache__/__init__.cpython-38.pyc | Bin 885 -> 0 bytes app/__pycache__/db.cpython-38.pyc | Bin 1494 -> 0 bytes app/__pycache__/mail.cpython-38.pyc | Bin 1991 -> 0 bytes app/__pycache__/schema.cpython-38.pyc | Bin 392 -> 0 bytes .gitignore => seccion_34_mailer/.gitignore | 0 Procfile => seccion_34_mailer/Procfile | 0 {app => seccion_34_mailer/app}/__init__.py | 0 {app => seccion_34_mailer/app}/db.py | 0 {app => seccion_34_mailer/app}/mail.py | 0 {app => seccion_34_mailer/app}/schema.py | 0 {app => seccion_34_mailer/app}/static/style.css | 0 .../app}/templates/base.html | 0 .../app}/templates/mail/create.html | 0 .../app}/templates/mail/index.html | 0 .../requirements.txt | 0 15 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 app/__pycache__/__init__.cpython-38.pyc delete mode 100644 app/__pycache__/db.cpython-38.pyc delete mode 100644 app/__pycache__/mail.cpython-38.pyc delete mode 100644 app/__pycache__/schema.cpython-38.pyc rename .gitignore => seccion_34_mailer/.gitignore (100%) rename Procfile => seccion_34_mailer/Procfile (100%) rename {app => seccion_34_mailer/app}/__init__.py (100%) rename {app => seccion_34_mailer/app}/db.py (100%) rename {app => seccion_34_mailer/app}/mail.py (100%) rename {app => seccion_34_mailer/app}/schema.py (100%) rename {app => seccion_34_mailer/app}/static/style.css (100%) rename {app => seccion_34_mailer/app}/templates/base.html (100%) rename {app => seccion_34_mailer/app}/templates/mail/create.html (100%) rename {app => seccion_34_mailer/app}/templates/mail/index.html (100%) rename requirements.txt => seccion_34_mailer/requirements.txt (100%) diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 902cb1548f3188f08e77209adf8c3cf9c2208bed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 885 zcmZWnJ&)5s5Z$$%#OF8&?vQ9{-H-xGgfJHeqPt6?I48i(%JFUz=lrF$gA^&Lprxfw zN<@3VW?LHWA0R4b4QCQ=tQo&~db=~bJD07Nfxv!Te+#Y^gucsU-+)6e!SlxuD55w* zp8P8jjulVAh^kckggljE7g@C%P@%qsMXek8`Bfm(TT=lv!B4^SFAxe;;E#BN)@Y$D z)IwX-wsnek_%Bi_q*h3)P_07s3N^=IA9NMn?b};JPQD3^w$h&u_z9SkAMq^9o^7=fpY6gmPO;WAH z+7GIOq=J!!IBRlPZOceSRoLv%jWbj2@3)$-jMqob2ba}f^jm5mMr68QV3;|S*lQ_ zMlLCZUlBhB{OetNp2n=5CX90bDs2Z#o~JokQWmfNBqUoE^E4szH1bKjOlaE9SrCLk zJ$(lKg%RVhbz3?iWjEwWwh~6bnO`v3nygxmH^MruW8?7qS#O%anAlYKLr_{8mqRRS hQ#s(}^^|)s(q+V6$g9oebLony{s#B&-~0do diff --git a/app/__pycache__/db.cpython-38.pyc b/app/__pycache__/db.cpython-38.pyc deleted file mode 100644 index ae1f1d2391f050f7f0685f2231b1ff31f70d4a32..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1494 zcmZ8hO>Y}F5an<`B}_=vFRU7$%CYBC8Yk*(?-z9)^Xk0U;#h`c#4l#NXL={5?KosLDBrPaJ&g>0MC3E9PkCQD%0 zns@XX7HFpp`D6i0dPi(yq8xPKO6z$mI=q>fnIJEP;@DfjUGQV6@(X;YiCrAgSzs!} zi9n0SAiu)ZgT}HH-{biX9Zhb?YkEztLBkRGefOGLGz)qMK;G;w$kN*&dk=%2?<$lw zgNgWCp3gN$5kyrL8WCGfq{U#M_&>&|s0&NrV+(?&AzcoEmy<~K|V$MKv}EuJvLhua)rn&ss)+QC0^1ELiq&4cr8BFJd;dZ z)LY*ICz0_GoY~13+a!1S@Dt%-18$*RsqKJb;9Gp{3L!K>TCay1?Ij&|g%0j-kle?R z?BZmCvocdtcav8A)o>dJm|xmjlThVjUS&?=mDsk2Rutkzbj&z#F5eckk3_~lRf5e+ a{S;#R8y@yg`Pqvz29K}GP<^KmM3r~vx diff --git a/app/__pycache__/mail.cpython-38.pyc b/app/__pycache__/mail.cpython-38.pyc deleted file mode 100644 index 81c352294689158236e1868c5a3c8eab60ecceb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1991 zcmZvdPmkL~6u>>>zj3_T-IlhLKgEX@)zvCFz<~pTmTf4jZqsU$g0PCL#4|~pwc~Wg zk#-|T98z)HkASq15CZWnIPwwZ%89Sg3%nVp)lzUY*aF?L2 z7VQ27d(k=p66j7~i`p0IoX%J>EyOmXQ$kr(&}^3W3o2|zpU){TggH$6d@LMBNy2Dc z2z$=bXqYomkLL`g6;XdSgC(sIEg~`yM%GW#m#76MSGvv^9VRCM7W#vBPZ&=gcY82o zXS5jSgvWA6uO0&g8Ml3Cya!#OP0%?eXpNRyp|7-Oc!`#{gxDNA>`sZ#4T51zpI%k6 zPK;8!264Nl4bd7eb+DRiZK)R)F-x6TXBeVjcZ9`hpT*{OU)&mMe$ zzXhF!J>((>dDuW$^ZqulgV=juU)ZgfQDEX@H!~B`jY^fEHycHr2to~DBmEc?Al@4}W zAz>`d(maRjP>l@rHHP(!^V(ViAGfFzcZF7P0ZRS8_MNx13a_+Qu%?q3o&}jPoo@3MLcH9NEcq3scpLiddVy zFYPyE_kkR=C}TO}>}_eeE-j|AD2%J_UFBB+B|Uf(It{zXQ$GXfbJ3;&k&;OZIg&=~ z0g*1)SO7C(UC!G)a(l1q#sCxvV}U0+LD!+;ok6&Qpl_ zD0GJ`&mzTH=oEP+F}a4U^?a63IejBg5g4c6{)e{65E4;@XD)G zHODlaQO28+%IdG=n90m3fE1Vts|%FLLx+;gCK*%((}|*KKci73@L(oPmP7GWl}Ul1 nK73)LvSKntne%CulX*%%ledgtg3f{M-ZVVi(19xt+Kqnz-5dBm diff --git a/app/__pycache__/schema.cpython-38.pyc b/app/__pycache__/schema.cpython-38.pyc deleted file mode 100644 index 614ea89808ffc7c96cb38e9f86a126e768b66d55..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 392 zcmZut!Ait15N)dmS$4m`%N#9;J?Kplt41j9wo9AJu9r}gV5@CXn)cAW_$^)p@sAcf z`4=9)9aD>Ce@)$U~& z%mKUSQv}`>poJIV2zZfX`SI#`1R571axofu`ULj+03c)F`55M*H*>=!T%#qpF%F35 z>!BI)@&3@b8N+CS!4EX!>GUU3&D{g1HT)Y=DQYhMgu_l-SKl_*<4mZ!YG|EFp8NO`&p0UC_0CBlS(EeA?kTmc#WJn0Z~eh(od5s; diff --git a/.gitignore b/seccion_34_mailer/.gitignore similarity index 100% rename from .gitignore rename to seccion_34_mailer/.gitignore diff --git a/Procfile b/seccion_34_mailer/Procfile similarity index 100% rename from Procfile rename to seccion_34_mailer/Procfile diff --git a/app/__init__.py b/seccion_34_mailer/app/__init__.py similarity index 100% rename from app/__init__.py rename to seccion_34_mailer/app/__init__.py diff --git a/app/db.py b/seccion_34_mailer/app/db.py similarity index 100% rename from app/db.py rename to seccion_34_mailer/app/db.py diff --git a/app/mail.py b/seccion_34_mailer/app/mail.py similarity index 100% rename from app/mail.py rename to seccion_34_mailer/app/mail.py diff --git a/app/schema.py b/seccion_34_mailer/app/schema.py similarity index 100% rename from app/schema.py rename to seccion_34_mailer/app/schema.py diff --git a/app/static/style.css b/seccion_34_mailer/app/static/style.css similarity index 100% rename from app/static/style.css rename to seccion_34_mailer/app/static/style.css diff --git a/app/templates/base.html b/seccion_34_mailer/app/templates/base.html similarity index 100% rename from app/templates/base.html rename to seccion_34_mailer/app/templates/base.html diff --git a/app/templates/mail/create.html b/seccion_34_mailer/app/templates/mail/create.html similarity index 100% rename from app/templates/mail/create.html rename to seccion_34_mailer/app/templates/mail/create.html diff --git a/app/templates/mail/index.html b/seccion_34_mailer/app/templates/mail/index.html similarity index 100% rename from app/templates/mail/index.html rename to seccion_34_mailer/app/templates/mail/index.html diff --git a/requirements.txt b/seccion_34_mailer/requirements.txt similarity index 100% rename from requirements.txt rename to seccion_34_mailer/requirements.txt From d088e470a3df843e88cdc5e322c1207328a9ac84 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:27:35 +0000 Subject: [PATCH 26/26] Bump flask from 2.2.2 to 2.2.5 in /seccion_30_todo Bumps [flask](https://github.com/pallets/flask) from 2.2.2 to 2.2.5. - [Release notes](https://github.com/pallets/flask/releases) - [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/flask/compare/2.2.2...2.2.5) --- updated-dependencies: - dependency-name: flask dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- seccion_30_todo/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seccion_30_todo/requirements.txt b/seccion_30_todo/requirements.txt index 8610dce..3886375 100644 --- a/seccion_30_todo/requirements.txt +++ b/seccion_30_todo/requirements.txt @@ -1,5 +1,5 @@ click==8.1.3 -Flask==2.2.2 +Flask==2.2.5 importlib-metadata==5.0.0 itsdangerous==2.1.2 Jinja2==3.1.2