#36908 closed Cleanup/optimization (fixed)
Email docs "quick example" shows unnecessary `fail_silently` param
| Reported by: | Mike Edmunds | Owned by: | SnippyCodes |
|---|---|---|---|
| Component: | Documentation | Version: | 6.0 |
| Severity: | Normal | Keywords: | docs email fail_silently |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The Quick examples section in the email docs includes fail_silently=False:
from django.core.mail import send_mail send_mail( "Subject here", "Here is the message.", "from@example.com", ["to@example.com"], fail_silently=False, )
fail_silently is an optional param defaulting to False. Showing it in the "straightforward" example suggests it's required or has some other default, encouraging users to unnecessarily include it in their own code. We should remove it from the example.
With the current django.core.mail implementation this isn't a huge deal, but needless use of fail_silently may interact poorly with other changes being contemplated in the email code (#35514).
Change History (6)
comment:1 by , 3 weeks ago
comment:2 by , 3 weeks ago
Hi ,
I’m interested in working on this documentation cleanup.
Before starting, could a maintainer please confirm that this change (removing fail_silently=False from the email quick example) is acceptable and aligns with Django docs style?
Thank you!
comment:3 by , 3 weeks ago
| Has patch: | set |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:4 by , 3 weeks ago
| Triage Stage: | Unreviewed → Accepted |
|---|
Thank you Mike! I agree it's worth removing.
comment:6 by , 3 weeks ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Hi Mike,
if the mentor approves this ticket, I’d like to work on it. Is that okay?