New feature: Templated email messages

65 views
Skip to first unread message

Артем Рыжов

unread,
Mar 2, 2012, 5:04:45 PM3/2/12
to django-d...@googlegroups.com
Hello dear Django developers!

I'm working as a web developer for many years. One of the most frequent tasks
is sending email messages. And template system is very usefull for this task
as for web pages. It's strange, but I have not found builtin support for email
templates on many platforms that I used early. So I have had to write own tool
for this purpose. This is a simple task, but it's like reinventing the wheel.
Same for Django. It's annoying to use the template class directly, but I have
not found any builtin shortcut function. I've found several third-party
solutions, but I did not like them and created my own (again) :) It is based
on class django.core.mail.Message and provides very similar interface. There
is also templated version of send_mail shortcut (but as I understand it's
going to become a method of Message class soon).

You can review my application at github:
https://github.com/artemrizhov/django-mail-templated

So, I propose to merge this app to Django core mail module. I'm ready to do
this work and to support this code in the future.

How is it likely to add this feature to Django? Where do I go to do the work?

Thanks.

--
Artem

Carl Meyer

unread,
Mar 2, 2012, 6:34:08 PM3/2/12
to django-d...@googlegroups.com
Hello Artem,

On 03/02/2012 03:04 PM, Артем Рыжов wrote:
> I'm working as a web developer for many years. One of the most frequent tasks
> is sending email messages. And template system is very usefull for this task
> as for web pages. It's strange, but I have not found builtin support for email
> templates on many platforms that I used early. So I have had to write own tool
> for this purpose. This is a simple task, but it's like reinventing the wheel.
> Same for Django. It's annoying to use the template class directly, but I have
> not found any builtin shortcut function. I've found several third-party
> solutions, but I did not like them and created my own (again) :) It is based
> on class django.core.mail.Message and provides very similar interface. There
> is also templated version of send_mail shortcut (but as I understand it's
> going to become a method of Message class soon).

Thanks for your proposal and offered contribution.

I think a couple of reasons this is not ready for core are right in your
message - it is easy to implement outside of core, and there are a
number of different third-party implementations, and no clear community
consensus on the Right Way to do it. The place for this evolution to
happen is outside of core, in third-party packages that are as easy for
developers to use as a "pip install".

If your implementation is really the best solution to a very common
need, it should become very popular, with many developers asserting that
they rely on it in every project. At that point, it becomes possible to
open the discussion of whether it belongs in core (and you'll note that
even with very popular extensions we tend to be quite conservative about
adding things to core if they can be done externally).

So I appreciate the offer, but I don't think the time is right to add
this to Django core.

Carl

signature.asc

Russell Keith-Magee

unread,
Mar 2, 2012, 11:54:10 PM3/2/12
to django-d...@googlegroups.com

On 03/03/2012, at 7:34 AM, Carl Meyer wrote:

> Hello Artem,
>
> On 03/02/2012 03:04 PM, Артем Рыжов wrote:
>> I'm working as a web developer for many years. One of the most frequent tasks
>> is sending email messages. And template system is very usefull for this task
>> as for web pages. It's strange, but I have not found builtin support for email
>> templates on many platforms that I used early. So I have had to write own tool
>> for this purpose. This is a simple task, but it's like reinventing the wheel.
>> Same for Django. It's annoying to use the template class directly, but I have
>> not found any builtin shortcut function. I've found several third-party
>> solutions, but I did not like them and created my own (again) :) It is based
>> on class django.core.mail.Message and provides very similar interface. There
>> is also templated version of send_mail shortcut (but as I understand it's
>> going to become a method of Message class soon).
>
> Thanks for your proposal and offered contribution.

> ...


> So I appreciate the offer, but I don't think the time is right to add
> this to Django core.

I agree with Carl's comments, but I would add one more point -- when proposing a new feature, it helps to look at previous discussions on the same topic. In this case, we have a ticket proposing this exact feature, and some active discussions regarding the exact API that should be exposed:

https://code.djangoproject.com/ticket/17193

Yours,
Russ Magee %-)

raa

unread,
Mar 3, 2012, 4:55:10 AM3/3/12
to Django developers
Ok :)

On 3 мар, 06:54, Russell Keith-Magee <russ...@keith-magee.com> wrote:
> I agree with Carl's comments, but I would add one more point -- when proposing a new feature, it helps to look at previous discussions on the same topic. In this case, we have a ticket proposing this exact feature, and some active discussions regarding the exact API that should be exposed:
>
> https://code.djangoproject.com/ticket/17193

Thank you Russell. I did some search but not in tickets. Just sent a
message there.
Reply all
Reply to author
Forward
0 new messages