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