#22734: Move SMTP / email settings to a dictionary
-------------------------------------+-------------------------------------
     Reporter:  jwa                  |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  Core (Mail)          |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  settings, email,     |      Needs documentation:  0
  mail, smtp                         |  Patch needs improvement:  1
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  1                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by claudep):

 I've written an alternative patch:
 https://github.com/django/django/pull/2836.

 The dict is now called SMTP_CONFIG. I also slightly modified the
 `BaseSettings` object so as it would be possible to only partially
 overwrite an existing dictionary setting. For example, defining
 `SMTP_CONFIG = {'USE_TLS': True}` in custom settings would not overwrite
 `SMTP_CONFIG` from global settings, but copy and update that dict, keeping
 the other default values.
 I'm not absolutely sure it's a good idea in general, as it might render
 more difficult deleting an entry from a global setting (e.g. defining
 `CACHES={'custom': ...}` would keep the `default` entry). An another idea
 could be making this mechanism opt-in/opt-out by having a special key on
 the dict (like `_keep_defaults`).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22734#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.0eea1c986df7c4d0691e5b09fa5ce65c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to