mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Updated mail service docs
* Trying to appease the Black-linter god...
This commit is contained in:
parent
0621929cd2
commit
ac884f3f75
|
@ -46,7 +46,7 @@ Features
|
|||
* Registration via django-allauth_
|
||||
* Comes with custom user model ready to go
|
||||
* Optional custom static build using Gulp and livereload
|
||||
* Send emails via Anymail_ (using Mailgun_ by default, but switchable)
|
||||
* Send emails via Anymail_ (using Mailgun_ by default or Amazon SES if AWS is selected cloud provider, but switchable)
|
||||
* Media storage using Amazon S3 or Google Cloud Storage
|
||||
* Docker support using docker-compose_ for development and production (using Traefik_ with LetsEncrypt_ support)
|
||||
* Procfile_ for deploying to Heroku
|
||||
|
@ -85,7 +85,7 @@ Optional Integrations
|
|||
.. _PythonAnywhere: https://www.pythonanywhere.com/
|
||||
.. _Traefik: https://traefik.io/
|
||||
.. _LetsEncrypt: https://letsencrypt.org/
|
||||
.. _pre-commit: https://github.com/pre-commit/pre-commit
|
||||
.. _pre-commit: https://github.com/pre-commit/pre-commit
|
||||
|
||||
Constraints
|
||||
-----------
|
||||
|
|
|
@ -70,6 +70,19 @@ cloud_provider:
|
|||
|
||||
Note that if you choose no cloud provider, media files won't work.
|
||||
|
||||
mail_service:
|
||||
Select an email service that Django-Anymail provides
|
||||
|
||||
1. Amazon SES_
|
||||
2. Mailgun_
|
||||
3. Mailjet_
|
||||
4. Mandrill_
|
||||
5. Postmark_
|
||||
6. SendGrid_
|
||||
7. SendinBlue_
|
||||
8. SparkPost_
|
||||
9. Plain/Vanilla Django-Anymail_
|
||||
|
||||
use_drf:
|
||||
Indicates whether the project should be configured to use `Django Rest Framework`_.
|
||||
|
||||
|
@ -132,6 +145,16 @@ debug:
|
|||
.. _AWS: https://aws.amazon.com/s3/
|
||||
.. _GCP: https://cloud.google.com/storage/
|
||||
|
||||
.. _SES: https://aws.amazon.com/ses/
|
||||
.. _Mailgun: https://www.mailgun.com
|
||||
.. _Mailjet: https://www.mailjet.com
|
||||
.. _Mandrill: http://mandrill.com
|
||||
.. _Postmark: https://postmarkapp.com
|
||||
.. _SendGrid: https://sendgrid.com
|
||||
.. _SendinBlue: https://www.sendinblue.com
|
||||
.. _SparkPost: https://www.sparkpost.com
|
||||
.. _Django-Anymail: https://anymail.readthedocs.io/en/stable/
|
||||
|
||||
.. _Django Rest Framework: https://github.com/encode/django-rest-framework/
|
||||
|
||||
.. _Django Compressor: https://github.com/django-compressor/django-compressor
|
||||
|
|
|
@ -52,6 +52,21 @@ DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a
|
|||
MAILGUN_API_KEY MAILGUN_API_KEY n/a raises error
|
||||
MAILGUN_DOMAIN MAILGUN_SENDER_DOMAIN n/a raises error
|
||||
MAILGUN_API_URL n/a n/a "https://api.mailgun.net/v3"
|
||||
MAILJET_API_KEY MAILJET_API_KEY n/a raises error
|
||||
MAILJET_SECRET_KEY MAILJET_SECRET_KEY n/a raises error
|
||||
MAILJET_API_URL n/a n/a "https://api.mailjet.com/v3"
|
||||
MANDRILL_API_KEY MANDRILL_API_KEY n/a raises error
|
||||
MANDRILL_API_URL n/a n/a "https://mandrillapp.com/api/1.0"
|
||||
POSTMARK_SERVER_TOKEN POSTMARK_SERVER_TOKEN n/a raises error
|
||||
POSTMARK_API_URL n/a n/a "https://api.postmarkapp.com/"
|
||||
SENDGRID_API_KEY SENDGRID_API_KEY n/a raises error
|
||||
SENDGRID_GENERATE_MESSAGE_ID True n/a raises error
|
||||
SENDGRID_MERGE_FIELD_FORMAT None n/a raises error
|
||||
SENDGRID_API_URL n/a n/a "https://api.sendgrid.com/v3/"
|
||||
SENDINBLUE_API_KEY SENDINBLUE_API_KEY n/a raises error
|
||||
SENDINBLUE_API_URL n/a n/a "https://api.sendinblue.com/v3/"
|
||||
SPARKPOST_API_KEY SPARKPOST_API_KEY n/a raises error
|
||||
SPARKPOST_API_URL n/a n/a "https://api.sparkpost.com/api/v1"
|
||||
======================================= =========================== ============================================== ======================================================================
|
||||
|
||||
--------------------------
|
||||
|
|
|
@ -208,39 +208,61 @@ EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
|||
{%- endif %}
|
||||
# https://anymail.readthedocs.io/en/stable/installation/#anymail-settings-reference
|
||||
ANYMAIL = {
|
||||
# https://anymail.readthedocs.io/en/stable/esps/
|
||||
{%- if cookiecutter.mail_service == 'Amazon SES' %}
|
||||
# https://anymail.readthedocs.io/en/stable/esps/amazon_ses/
|
||||
{%- elif cookiecutter.mail_service == 'Mailgun' %}
|
||||
"MAILGUN_API_KEY": env("MAILGUN_API_KEY"),
|
||||
"MAILGUN_SENDER_DOMAIN": env("MAILGUN_DOMAIN"),
|
||||
"MAILGUN_API_URL": env("MAILGUN_API_URL", default="https://api.mailgun.net/v3"),
|
||||
"MAILGUN_API_URL": env(
|
||||
"MAILGUN_API_URL",
|
||||
default="https://api.mailgun.net/v3"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/mailgun/
|
||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||
"MAILJET_API_KEY": env("MAILJET_API_KEY"),
|
||||
"MAILJET_SECRET_KEY": env("MAILJET_SECRET_KEY"),
|
||||
"MAILJET_API_URL": env("MAILJET_API_URL", default="https://api.mailjet.com/v3"),
|
||||
"MAILJET_API_URL": env(
|
||||
"MAILJET_API_URL",
|
||||
default="https://api.mailjet.com/v3"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/mailjet/
|
||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||
"MANDRILL_API_KEY": env("MANDRILL_API_KEY"),
|
||||
"MANDRILL_API_URL": env("MANDRILL_API_URL", default="https://mandrillapp.com/api/1.0"),
|
||||
"MANDRILL_API_URL": env(
|
||||
"MANDRILL_API_URL",
|
||||
default="https://mandrillapp.com/api/1.0"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/mandrill/
|
||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||
"POSTMARK_SERVER_TOKEN": env("POSTMARK_SERVER_TOKEN"),
|
||||
"POSTMARK_API_URL": env("POSTMARK_API_URL", default="https://api.postmarkapp.com/"),
|
||||
"POSTMARK_API_URL": env(
|
||||
"POSTMARK_API_URL",
|
||||
default="https://api.postmarkapp.com/"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/postmark/
|
||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||
"SENDGRID_API_KEY": env("SENDGRID_API_KEY"),
|
||||
"SENDGRID_GENERATE_MESSAGE_ID": env("SENDGRID_GENERATE_MESSAGE_ID"),
|
||||
"SENDGRID_MERGE_FIELD_FORMAT": env("SENDGRID_MERGE_FIELD_FORMAT"),
|
||||
"SENDGRID_API_URL": env("SENDGRID_API_URL", default="https://api.sendgrid.com/v3/"),
|
||||
"SENDGRID_API_URL": env(
|
||||
"SENDGRID_API_URL",
|
||||
default="https://api.sendgrid.com/v3/"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/sendgrid/
|
||||
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
||||
"SENDINBLUE_API_KEY": env("SENDINBLUE_API_KEY"),
|
||||
"SENDINBLUE_API_URL": env("SENDINBLUE_API_URL", default="https://api.sendinblue.com/v3/"),
|
||||
"SENDINBLUE_API_URL": env(
|
||||
"SENDINBLUE_API_URL",
|
||||
default="https://api.sendinblue.com/v3/"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/sendinblue/
|
||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||
"SPARKPOST_API_KEY": env("SPARKPOST_API_KEY"),
|
||||
"SPARKPOST_API_URL": env("SPARKPOST_API_URL", default="https://api.sparkpost.com/api/v1"),
|
||||
"SPARKPOST_API_URL": env(
|
||||
"SPARKPOST_API_URL",
|
||||
default="https://api.sparkpost.com/api/v1"
|
||||
),
|
||||
# https://anymail.readthedocs.io/en/stable/esps/sparkpost/
|
||||
{%- endif %}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user