sunscrapers / django-templated-mail

Send emails using Django template system.
MIT License
95 stars 21 forks source link

DOMAIN config variable name is too open #9

Open danielgomezrico opened 5 years ago

danielgomezrico commented 5 years ago

In http://django-templated-mail.readthedocs.io/en/latest/settings.html the variable DOMAIN is so open and it may clash with other plugins setups.

Proposals:

DJANGO_TEMPLATED_EMAIL = {
       'DOMAIN' : ''
}
YPCrumble commented 5 years ago

Thanks for building this repo (and for Djoser)!

I would much prefer the first proposal here - adding a group under DJANGO_TEMPLATED_EMAIL. This would follow "explicit rather than implicit" and make it easier in the future for me to search for configuration relevant to this package.

I'd be happy to make a backwards-compatible PR if that would be appreciated? Furthermore, the docs are confusing because they show the internals of a dict, not constants:

'DOMAIN': 'example.com'
'SITE_NAME': 'Foo Website'