Add proper email notifications

This commit is contained in:
2026-05-14 23:19:50 +03:00
parent fe62575790
commit 9e16b78793
34 changed files with 1313 additions and 83 deletions

View File

@@ -9,6 +9,11 @@ SECRET_KEY=replace-me-with-a-long-random-string
DEBUG=true
ALLOWED_HOSTS=localhost,127.0.0.1
# Public base URL used in outgoing emails (confirmation link, detail-page
# link). Defaults to http://localhost:8000 if unset. In production set to
# e.g. https://print.hamlab.lt -- no trailing slash.
SITE_URL=http://localhost:8000
# --- PostgreSQL ---
# Used by the `db` container and interpolated into DATABASE_URL inside
# compose.yaml; the `web` container reads DATABASE_URL via dj-database-url.
@@ -16,15 +21,20 @@ POSTGRES_DB=hamprint
POSTGRES_USER=hamprint
POSTGRES_PASSWORD=changeme
# --- Mailjet (transactional email) ---
# Only used when running with `hamprint.settings.prod`; `hamprint.settings.dev`
# overrides EMAIL_BACKEND to the console backend so emails are printed to
# the `web` container logs.
# Get keys at https://app.mailjet.com/account/apikeys
MAILJET_API_KEY=
MAILJET_API_SECRET=
# --- Mailtrap (transactional email) ---
# When MAILTRAP_API_TOKEN is set, Django sends through Mailtrap's HTTPS API
# via django-anymail. When blank, settings/base.py falls back to the console
# email backend -- handy for local development without burning real quota or
# spamming real addresses.
# Get a token at https://mailtrap.io/api-tokens
MAILTRAP_API_TOKEN=
DEFAULT_FROM_EMAIL=hamprint <noreply@hamlab.lt>
# Optional: set to a Mailtrap testing-inbox ID to capture outgoing mail in a
# sandbox inbox instead of actually delivering it. Find the ID in the URL
# of the inbox at https://mailtrap.io/inboxes. Leave blank for real sending.
MAILTRAP_TEST_INBOX_ID=
# --- Google OAuth (django-allauth Google provider) ---
# Configure at https://console.cloud.google.com/apis/credentials and add a
# SocialApp via Django admin (/admin/socialaccount/socialapp/add/).