Django

Code

Ticket #4707 (closed: wontfix)

Opened 11 months ago

Last modified 6 months ago

Allow attachements in mail_{admins,managers}

Reported by: calvin@debian.org Assigned to: thejaswi_puthraya
Component: django.core.mail Version: SVN
Keywords: sprintdec01 Cc:
Triage Stage: Ready for checkin Has patch: 0
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

The patch adds a parameter to send attachements with mail_admins() and mail_managers() methods.

Attachments

mail_attachements.diff (1.3 kB) - added by calvin@debian.org on 06/27/07 10:08:59.
mail_attachments_1.diff (1.3 kB) - added by thejaswi_puthraya on 11/30/07 22:19:56.
corrected the typos in the previous diff

Change History

06/27/07 10:08:59 changed by calvin@debian.org

  • attachment mail_attachements.diff added.

06/27/07 23:35:49 changed by mtredinnick

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to wontfix.
  • needs_tests changed.
  • needs_docs changed.

As explained in the documentation, the whole idea of creating the more object-oriented design for email was to avoid adding more and more parameters to the existing methods. Those methods are there for backwards compatibility only. They won't be extended with any new parameters (if you want to use the new features, you have to change your code anyway. Switching to using EmailMessage takes no time).

06/27/07 23:47:45 changed by mtredinnick

  • status changed from closed to reopened.
  • resolution deleted.
  • component changed from Uncategorized to django.core.mail.
  • stage changed from Unreviewed to Design decision needed.

Thinking this over a bit more, there might be a case for admin and manager mail to allow it, since the equivalent code is a bit fiddly to write.

(We can't use the existing patch, though, since it misspells "attachment" everywhere.)

09/24/07 03:47:41 changed by calvin@debian.org

Perhaps it is helpful to tell for what I am needing this. Whenever a server error occurs, I mail a traceback.html attachment (which is manually generated from the django debug error view) using the mail_admins() method. Then I can open the traceback.html on my local box and analyze the problem without touching the server which runs in non-debug mode.

I will send an updated patch without the spelling error once I get to it.

11/30/07 22:19:56 changed by thejaswi_puthraya

  • attachment mail_attachments_1.diff added.

corrected the typos in the previous diff

11/30/07 22:22:41 changed by thejaswi_puthraya

  • keywords set to sprintdec01.
  • owner changed from nobody to thejaswi_puthraya.
  • status changed from reopened to new.
  • stage changed from Design decision needed to Ready for checkin.

12/01/07 14:28:22 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

This isn't worth extending the API for. If you want to add extra stuff beyond want mail_admins does, you can write your own handler and an exception middleware. The support already exists for that.


Add/Change #4707 (Allow attachements in mail_{admins,managers})




Change Properties
Action