Re: SMTP configuration in a dict

2014-05-30 Thread Julian Wachholz
Discussion may continue in this ticket then:
https://code.djangoproject.com/ticket/22734

Cheers

On Wed, May 28, 2014 at 10:29 PM, Aymeric Augustin
 wrote:
> Still, it's a good idea, please file a Trac ticket if there isn't one
> already.
>
> --
> Aymeric.
>
> Le 28 mai 2014 à 13:22, Tim Graham  a écrit :
>
> Ramiro tried to do something similar, moving the cookie settings to a
> dictionary, see #21051, but gave up due to backwards compatibility concerns.
> Not saying it's impossible, but it may be a bit trickier than it looks at
> first.
>
> On Wednesday, May 28, 2014 7:06:00 AM UTC-4, Julian Wachholz wrote:
>>
>> Hi django-developers
>>
>> I'd like to propose a relatively small change to the way we configure our
>> SMTP email backends.
>> Up until now, configuring your SMTP backend took up to 6 individual
>> settings, ranging from EMAIL_HOST to EMAIL_USE_SSL etc.
>>
>> We already have a dictionary to configure things like caches and
>> databases, so why not for sending email (at least with the SMTP backend).
>> I've already created a POC branch complete with docs and deprecation
>> warnings here:
>> https://github.com/julianwachholz/django/tree/feature/12factor-smtp
>>
>> Please let me know what you think!
>>
>> Cheers
>> Julian
>>
>> PS: This change is only so altruistic, as it would enable me to include
>> email settings in my dj-database-url fork
>> (https://github.com/julianwachholz/dj-config-url).
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2a94dfa5-e087-4d5f-9b34-620652611c82%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2884B9B1-D40B-4F31-8902-28B91DDC69E0%40polytechnique.org.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CALvBJz1EawsS62OREO1GzU7bAVmtm-6ZGqL2YxYTWuEWTEXkZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: SMTP configuration in a dict

2014-05-28 Thread Aymeric Augustin
Still, it's a good idea, please file a Trac ticket if there isn't one already.

-- 
Aymeric.

> Le 28 mai 2014 à 13:22, Tim Graham  a écrit :
> 
> Ramiro tried to do something similar, moving the cookie settings to a 
> dictionary, see #21051, but gave up due to backwards compatibility concerns. 
> Not saying it's impossible, but it may be a bit trickier than it looks at 
> first.
> 
>> On Wednesday, May 28, 2014 7:06:00 AM UTC-4, Julian Wachholz wrote:
>> Hi django-developers
>> 
>> I'd like to propose a relatively small change to the way we configure our 
>> SMTP email backends.
>> Up until now, configuring your SMTP backend took up to 6 individual 
>> settings, ranging from EMAIL_HOST to EMAIL_USE_SSL etc.
>> 
>> We already have a dictionary to configure things like caches and databases, 
>> so why not for sending email (at least with the SMTP backend).
>> I've already created a POC branch complete with docs and deprecation 
>> warnings here: 
>> https://github.com/julianwachholz/django/tree/feature/12factor-smtp
>> 
>> Please let me know what you think!
>> 
>> Cheers
>> Julian
>> 
>> PS: This change is only so altruistic, as it would enable me to include 
>> email settings in my dj-database-url fork 
>> (https://github.com/julianwachholz/dj-config-url).
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/2a94dfa5-e087-4d5f-9b34-620652611c82%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2884B9B1-D40B-4F31-8902-28B91DDC69E0%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.


Re: SMTP configuration in a dict

2014-05-28 Thread Andi Albrecht
Hi,

On Wed, May 28, 2014 at 1:06 PM, Julian Wachholz  wrote:
> Hi django-developers
>
> I'd like to propose a relatively small change to the way we configure our
> SMTP email backends.
> Up until now, configuring your SMTP backend took up to 6 individual
> settings, ranging from EMAIL_HOST to EMAIL_USE_SSL etc.
>
> We already have a dictionary to configure things like caches and databases,
> so why not for sending email (at least with the SMTP backend).
> I've already created a POC branch complete with docs and deprecation
> warnings here:
> https://github.com/julianwachholz/django/tree/feature/12factor-smtp
>
> Please let me know what you think!

I've came across this too while working on
https://code.djangoproject.com/ticket/20743 (add support for ssl
keyfile/certfile). If support for keyfile/certfile would be added two
additional settings for the SMTP backend would be required to
configure the file paths.

The current settings for emails is confusing IMO since some settings
are for emails in general (EMAIL_BACKEND, EMAIL_SUBJECT_PREFIX) and
others are backend related (EMAIL_FILE_PATH for the file backend,
several others for the SMTP backend).

IMO it's a good idea to make it clear which settings belong to which
backend and a dictionary-based solution sounds good to me.

--
Andi

>
> Cheers
> Julian
>
> PS: This change is only so altruistic, as it would enable me to include
> email settings in my dj-database-url fork
> (https://github.com/julianwachholz/dj-config-url).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/3ed1fa0e-8676-412e-8265-aaa196465ffb%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFKCSkSOCcWkU3QKk0g3E2bRx1J52e9OaU7ShMBR9jZ%2B1FmRXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: SMTP configuration in a dict

2014-05-28 Thread Tim Graham
Ramiro tried to do something similar, moving the cookie settings to a 
dictionary, see #21051 , but 
gave up due to backwards compatibility concerns. Not saying it's 
impossible, but it may be a bit trickier than it looks at first.

On Wednesday, May 28, 2014 7:06:00 AM UTC-4, Julian Wachholz wrote:
>
> Hi django-developers
>
> I'd like to propose a relatively small change to the way we configure our 
> SMTP email backends.
> Up until now, configuring your SMTP backend took up to 6 individual 
> settings, ranging from EMAIL_HOST to EMAIL_USE_SSL etc.
>
> We already have a dictionary to configure things like caches and 
> databases, so why not for sending email (at least with the SMTP backend).
> I've already created a POC branch complete with docs and deprecation 
> warnings here: 
> https://github.com/julianwachholz/django/tree/feature/12factor-smtp
>
> Please let me know what you think!
>
> Cheers
> Julian
>
> PS: This change is only so altruistic, as it would enable me to include 
> email settings in my dj-database-url fork (
> https://github.com/julianwachholz/dj-config-url).
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2a94dfa5-e087-4d5f-9b34-620652611c82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


SMTP configuration in a dict

2014-05-28 Thread Julian Wachholz
Hi django-developers

I'd like to propose a relatively small change to the way we configure our 
SMTP email backends.
Up until now, configuring your SMTP backend took up to 6 individual 
settings, ranging from EMAIL_HOST to EMAIL_USE_SSL etc.

We already have a dictionary to configure things like caches and databases, 
so why not for sending email (at least with the SMTP backend).
I've already created a POC branch complete with docs and deprecation 
warnings here: 
https://github.com/julianwachholz/django/tree/feature/12factor-smtp

Please let me know what you think!

Cheers
Julian

PS: This change is only so altruistic, as it would enable me to include 
email settings in my dj-database-url fork 
(https://github.com/julianwachholz/dj-config-url).

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3ed1fa0e-8676-412e-8265-aaa196465ffb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.