Allow user to choose email provider

This commit is contained in:
Michael Karamuth 2019-11-22 23:12:01 +04:00
parent bfea63ca00
commit 043555b43d
3 changed files with 6 additions and 18 deletions

View File

@ -17,22 +17,10 @@
"windows": "n",
"use_pycharm": "n",
"use_docker": "n",
"postgresql_version": [
"11.3",
"10.8",
"9.6",
"9.5",
"9.4"
],
"js_task_runner": [
"None",
"Gulp"
],
"cloud_provider": [
"AWS",
"GCP",
"None"
],
"postgresql_version": ["11.3", "10.8", "9.6", "9.5", "9.4"],
"js_task_runner": ["None", "Gulp"],
"cloud_provider": ["AWS", "GCP", "None"],
"email_provider": ["SES", "Mailgun"],
"custom_bootstrap_compilation": "n",
"use_compressor": "n",
"use_celery": "n",

View File

@ -186,7 +186,7 @@ ADMIN_URL = env("DJANGO_ADMIN_URL")
# ------------------------------------------------------------------------------
# https://anymail.readthedocs.io/en/stable/installation/#installing-anymail
INSTALLED_APPS += ["anymail"] # noqa F405
{%- if cookiecutter.cloud_provider == 'AWS' %}
{%- if cookiecutter.email_provider == 'SES' %}
# Use boto3 credentials
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials
EMAIL_BACKEND = "anymail.backends.amazon_ses.EmailBackend"

View File

@ -19,7 +19,7 @@ django-storages[boto3]==1.8 # https://github.com/jschneier/django-storages
django-storages[google]==1.8 # https://github.com/jschneier/django-storages
{%- endif %}
{%- if cookiecutter.cloud_provider == 'AWS' %}
{%- if cookiecutter.email_provider == 'SES' %}
django-anymail[amazon_ses]==7.0.0 # https://github.com/anymail/django-anymail
{%- else %}
django-anymail[mailgun]==7.0.0 # https://github.com/anymail/django-anymail