aboutsummaryrefslogtreecommitdiffstats
path: root/config/settings
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-12-04 17:11:55 +0000
committerMatthew Lemon <y@yulqen.org>2024-12-04 17:11:55 +0000
commit7cd2fd2b75bc5597e9b2a128bf61201910be6df2 (patch)
tree411c26f821129f196b2a38863a34b05e4e8388e9 /config/settings
parent4b21e3889e8337fa5bc9e58cdfc61a9f2019adc9 (diff)
Email verification
- Associated changes in the .env file now allow us to test the SMTP server config - Added mine and J's email ad admins - Grab env variables from the .env file in the local.py file for testing purposes - Set an expiry of 24hrs for the validation link to work - Added an HTML version of the verification email
Diffstat (limited to 'config/settings')
-rw-r--r--config/settings/base.py2
-rw-r--r--config/settings/local.py15
2 files changed, 14 insertions, 3 deletions
diff --git a/config/settings/base.py b/config/settings/base.py
index 81e0f82..28e40ed 100644
--- a/config/settings/base.py
+++ b/config/settings/base.py
@@ -234,7 +234,7 @@ EMAIL_TIMEOUT = 5
# Django Admin URL.
ADMIN_URL = "admin/"
# https://docs.djangoproject.com/en/dev/ref/settings/#admins
-ADMINS = [("""Matthew Lemon""", "y@yulqen.org")]
+ADMINS = [("Matthew Lemon", "matt@matthewlemon.com"), ("Joanna Lemon", "joannalemon1@gmail.com")]
# https://docs.djangoproject.com/en/dev/ref/settings/#managers
MANAGERS = ADMINS
# https://cookiecutter-django.readthedocs.io/en/latest/settings.html#other-environment-settings
diff --git a/config/settings/local.py b/config/settings/local.py
index 155b219..0e4b7e4 100644
--- a/config/settings/local.py
+++ b/config/settings/local.py
@@ -29,9 +29,20 @@ CACHES = {
# EMAIL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#email-host
-EMAIL_HOST = env("EMAIL_HOST", default="mailpit")
+# EMAIL_HOST = env("EMAIL_HOST", default="mailpit")
# https://docs.djangoproject.com/en/dev/ref/settings/#email-port
-EMAIL_PORT = 1025
+# EMAIL_PORT = 1025
+
+DEFAULT_FROM_EMAIL = env(
+ "DJANGO_DEFAULT_FROM_EMAIL",
+ default="alphabetlearning.online <help@alphabetlearning.online>",
+)
+SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
+EMAIL_HOST = env('EMAIL_HOST')
+EMAIL_PORT = env('EMAIL_PORT')
+EMAIL_HOST_USER = env('EMAIL_HOST_USER')
+EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD')
+EMAIL_USE_TLS = env.bool('EMAIL_USE_TLS', default=True)
# WhiteNoise
# ------------------------------------------------------------------------------