diff --git a/app/email.py b/app/email.py index 704c80f..d7557d4 100644 --- a/app/email.py +++ b/app/email.py @@ -1,12 +1,17 @@ from flask import render_template from flask_mail import Message +from threading import Thread from app import app, mail # mail = flask_mail.Mail(app) +def send_async_email(app, msg): + with app.app_context(): + mail.send(msg) + def send_email(subject, sender, recipients, text_body, html_body): msg = Message(subject, sender=sender, recipients=recipients) msg.body = text_body msg.html = html_body - mail.send(msg) + Thread(target=send_async_email, args=(app, msg)).start() def send_pw_reset_email(user): token = user.get_reset_password_token() @@ -18,4 +23,3 @@ def send_pw_reset_email(user): html_body=render_template('email/reset_password.html', user=user, token=token)) - diff --git a/app/static/css/pedagogy.css b/app/static/css/pedagogy.css index 025180e..65e17b6 100644 --- a/app/static/css/pedagogy.css +++ b/app/static/css/pedagogy.css @@ -281,4 +281,22 @@ input[type=range]::-moz-range-thumb { textarea#comments { height: 120px; +} + +/* List items*/ + +dt { + color: #273f52; +} + +dd { + color: white; +} + +#submit { + background: rgb(2, 73, 109); + border-radius: 8%; + border: none; + padding: 1% 2.5%; + color: white; } \ No newline at end of file diff --git a/app/templates/login.html b/app/templates/login.html index 922777c..ab4bce2 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -2,32 +2,67 @@ {% block content %}
- Forgot your password? - Reset password here -
- {{ form.email.label }}
- {{ form.email(size=32) }}
+
+ {{ form.email.label }}
+ {{ form.email(size=32) }}
+
+ {% for error in form.email.errors %}
+ {{ error }}
+ {% endfor %}
+
+ {{ form.password.label }}
+ {{ form.password(size=32) }}
+
+ {% for error in form.password.errors %}
+ {{ error }}
+ {% endfor %}
+
+ {{ form.password2.label }}
+ {{ form.password2(size=32) }}
+
+ {% for error in form.password2.errors %}
+ {{ error }}
+ {% endfor %}
+
{{ form.submit() }}
++ Join algoritma's production team (consultants / instructors) to gain full access to Pedagogy. +
- {{ form.password.label }}
- {{ form.password(size=32) }}
+
- {{ form.password2.label }}
- {{ form.password2(size=32) }}
-
- {% for error in form.password2.errors %}
- {{ error }}
- {% endfor %}
-
{{ form.submit() }}
- +