mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-13 16:34:52 +03:00
Allow user to choose email provider
This commit is contained in:
parent
bfea63ca00
commit
043555b43d
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user