Repository navigation
Conversation
A magic link is the only way in, so a deployment that cannot send cannot be used. Fastmail carries it over SMTP on port 465, signed in with an app password. EMAIL_USE_CONSOLE prints instead, and beats a configured host. The local file now holds real credentials, so a developer needs a way to stop a test sign-in reaching a real inbox without deleting them. The variable behind DEFAULT_FROM_EMAIL is EMAIL_FROM, so one file has one prefix. The setting keeps Django's name, because Django reads it. Tests pin the console branch. defaults.py loads .env.local on import, so the host read the SMTP branch while CI, which has no file, read the other one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X3FXXWHwTQ89ytonD2sZaT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A magic link is the only way to sign in, so a deployment that cannot
send cannot be used. Fastmail carries it over SMTP on port 465, signed
in with an app password.
The toggle
EMAIL_USE_CONSOLEprints the mail instead of sending it, and beats aconfigured host:
The local file now holds real credentials, so a developer needs a way to
stop a test sign-in reaching a real inbox without deleting them.
It is ours, not Django's, and it reads like Django's.
defaults.pydefines it and
email_backendbeside it, and the email block insettings.pysays so, because the name alone cannot.EMAIL_FROM
The variable behind
DEFAULT_FROM_EMAILis nowEMAIL_FROM, so one filehas one prefix. The Django setting keeps its own name: Django reads it
for every message.
The deployment's
.envmoved with it, in the same change.Tests pin the console branch
defaults.pyloads.env.localon import. Without pinning,just teston the host read the SMTP branch while CI, which mounts
/dev/nulloverthat file, read the other one.
The inputs are pinned, not
EMAIL_BACKEND. pytest-django swaps in locmemon top, so
mail.outboxstill holds what was sent.A defect this found
make-env.pyrewrote a file line by line, so an answer to a prompt for akey the file predated went nowhere. Every existing
.env.localpredatesthe mail block, so the password would have been asked for and discarded.
bin/tests/test_make_env.pycovers it, including theEMAIL_HOSTandEMAIL_HOST_USERprefix collision.Checks
just checkpasses: 638 tests at 96.66%, ruff, the docs cross-check,prose across 147 files, 21
bin/tests, and no missing migration.🤖 Generated with Claude Code
https://claude.ai/code/session_01X3FXXWHwTQ89ytonD2sZaT