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", "windows": "n",
"use_pycharm": "n", "use_pycharm": "n",
"use_docker": "n", "use_docker": "n",
"postgresql_version": [ "postgresql_version": ["11.3", "10.8", "9.6", "9.5", "9.4"],
"11.3", "js_task_runner": ["None", "Gulp"],
"10.8", "cloud_provider": ["AWS", "GCP", "None"],
"9.6", "email_provider": ["SES", "Mailgun"],
"9.5",
"9.4"
],
"js_task_runner": [
"None",
"Gulp"
],
"cloud_provider": [
"AWS",
"GCP",
"None"
],
"custom_bootstrap_compilation": "n", "custom_bootstrap_compilation": "n",
"use_compressor": "n", "use_compressor": "n",
"use_celery": "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 # https://anymail.readthedocs.io/en/stable/installation/#installing-anymail
INSTALLED_APPS += ["anymail"] # noqa F405 INSTALLED_APPS += ["anymail"] # noqa F405
{%- if cookiecutter.cloud_provider == 'AWS' %} {%- if cookiecutter.email_provider == 'SES' %}
# Use boto3 credentials # Use boto3 credentials
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials # https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials
EMAIL_BACKEND = "anymail.backends.amazon_ses.EmailBackend" 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 django-storages[google]==1.8 # https://github.com/jschneier/django-storages
{%- endif %} {%- endif %}
{%- if cookiecutter.cloud_provider == 'AWS' %} {%- if cookiecutter.email_provider == 'SES' %}
django-anymail[amazon_ses]==7.0.0 # https://github.com/anymail/django-anymail django-anymail[amazon_ses]==7.0.0 # https://github.com/anymail/django-anymail
{%- else %} {%- else %}
django-anymail[mailgun]==7.0.0 # https://github.com/anymail/django-anymail django-anymail[mailgun]==7.0.0 # https://github.com/anymail/django-anymail