fix defaults for running locally and make email server not required.

This commit is contained in:
2021-07-07 13:47:21 -05:00
parent 3cb6992359
commit bdabd61057
5 changed files with 45 additions and 26 deletions

View File

@ -64,12 +64,13 @@ def login():
current_app.config["FLASK_MAIL_INSTANCE"].send(
Message(
"Click This Link to Login to Capsul",
sender=current_app.config["MAIL_DEFAULT_SENDER"],
body=message,
recipients=[email]
)
)
return render_template("login-landing.html", email=email)
return render_template("login-landing.html", email=email, has_smtp=(current_app.config["MAIL_SERVER"] != ""))
for error in errors:
flash(error)