Add email configuration.

This commit is contained in:
Víðir Valberg Guðmundsson 2021-03-03 14:58:46 +01:00
parent 5b7b95d426
commit 79f8903c2c
2 changed files with 11 additions and 2 deletions

View File

@ -103,7 +103,16 @@ SITE_ID = 1
LOGIN_REDIRECT_URL = "/"
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
EMAIL_BACKEND = env.str(
"EMAIL_BACKEND", default="django.core.mail.backends.console.EmailBackend"
)
# Parse email URLs, e.g. "smtp://"
email = env.dj_email_url("EMAIL_URL", default="smtp://")
EMAIL_HOST = email["EMAIL_HOST"]
EMAIL_PORT = email["EMAIL_PORT"]
EMAIL_HOST_PASSWORD = email["EMAIL_HOST_PASSWORD"]
EMAIL_HOST_USER = email["EMAIL_HOST_USER"]
EMAIL_USE_TLS = email["EMAIL_USE_TLS"]
# Always show DDT in development for any IP, not just 127.0.0.1 or
# settings.INTERNAL_IPS. This is useful in a docker setup where the

View File

@ -17,7 +17,7 @@
<label for="id_username"
class="visually-hidden">
{% trans "Username/e-mail" %}
{% trans "E-mail" %}
</label>
<input type="text"
id="id_username"