Re: Overwrite send_mail

2009-05-11 Thread Malcolm Tredinnick
On Sun, 2009-05-10 at 13:54 +0100, Dougal Matthews wrote: > Thanks Will, > Found it > here; > http://code.djangoproject.com/browser/django/trunk/django/test/utils.py#L50 > > > That does look about what I am hoping to do, not so sure about monkey > patching the core though. > > > Basically, as

Re: Overwrite send_mail

2009-05-10 Thread Dougal Matthews
Thanks Will, Found it here; http://code.djangoproject.com/browser/django/trunk/django/test/utils.py#L50 That does look about what I am hoping to do, not so sure about monkey patching the core though. Basically, assuming django's send_mail is the standard most apps use, I want to be able to hook i

Re: Overwrite send_mail

2009-05-10 Thread Will Hardy
The test runner does something similar if I remember correctly, have a look in django.test.utils and see if you can make something useful out of that. Cheers, Will --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Overwrite send_mail

2009-05-10 Thread mark hellewell
Hi, The django-mailer app I've been using simply defines a send_mail function with the same signature as the one from django.core.mail. With the 'mailer' app in your INSTALLED_APPS you can then just do something like this at the top of your views.py etc: # use django-mailer app if it's availabl

Overwrite send_mail

2009-05-09 Thread Dougal
Hi, is there a hook to help me replace the django send_mail function? I know I can just create my own but I want a nice easy way to handle emails my own way for a bunch of apps and it seems almost all re- usable apps tend to use send_mail. I've hunted but can't find anything in the docs Cheers