Django Weekly: Safer email docs, doc build fixes, and patch release prep (June 29 – July 5, 2026)
- Commits summarized
- 8
- Period
- Jun 29 - Jul 05, 2026
- Published
- Jul 06, 2026
Django Weekly Development Report — June 29 – July 5, 2026
If you follow Django’s development or maintain a project based on it, this week’s commits are heavy on documentation safety, security hygiene for email handling, and housekeeping that keeps the release pipeline smooth. Below are the highlights from the 8 commits merged during this period.
📬 Safer Email Examples in Documentation
Mike Edmunds landed two related patches that modernise Django’s email guidance in the forms and topics docs.
-
#37162 — Updated ContactForm docs example to use safe practices
The classicContactFormexample no longer uses the user-suppliedsenderaddress asfrom_email(a phishing vector). It’s now renamed tocontact_emailand placed in thereply_toheader. Thecc_myselfcheckbox was removed (it could be abused to send spam) and replaced with anurgentfield to keep aBooleanFieldexample alive. Several outdated output examples were also fixed. -
#34753 — Extended security and safety remarks in email topics docs
The long-neglected “Preventing header injection” section was rewritten. It now explains that Django (via Python’ssmtplib) prevents CRLF injection by default, adds guidance on safely formatting email addresses with display names, and warns that custom backends bypassing Django’s protections must handle injection themselves. TheADMINS,DEFAULT_FROM_EMAIL, andSERVER_EMAILsettings docs now link to the new “Formatting email addresses” section.
🐛 Doc Build Warnings Cleanup
Several minor but welcome fixes to silence Sphinx warnings that had crept into the documentation build.
- Disambiguated duplicate “Example” targets in the release howto —
howto-release-django.txtwas triggering aDuplicate explicit target namewarning. - Fixed multiple toctrees warning in writing-code/index.txt — A document referenced in more than one toctree, introduced in a recent change.
- Fixed duplicate target name in howto-release-django.txt — Most links were converted to anonymous references to avoid implicit named reference collisions.
🔧 Release & Housekeeping
- Stub release notes for 6.0.7 and 5.2.16 — Jacob Walls added the boilerplate release notes and dates for the upcoming patch releases.
- asgiref bump reminder added to release checklist — Jacob Walls added a note to remind releasers to bump the
asgirefdependency. - Test base file renamed — Tim Graham renamed
tests/migrations/test_base.pytotests/migrations/base.pyto align with the convention used elsewhere (none of its code is a test itself, only shared base classes).
This report covers the 8 commits merged between June 29 and July 5, 2026. The full change log is available on GitHub.