mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-10 16:12:29 +03:00
Switch from django-mailgun to django-anymail. Fix #539.
This commit is contained in:
parent
d7ac30a1d7
commit
a658339b99
|
@ -32,7 +32,7 @@ Features
|
||||||
* Registration via django-allauth_
|
* Registration via django-allauth_
|
||||||
* Comes with custom user model ready to go.
|
* Comes with custom user model ready to go.
|
||||||
* Grunt build for compass and livereload
|
* Grunt build for compass and livereload
|
||||||
* Basic e-mail configurations for sending emails via Mailgun_
|
* Send emails via Anymail_ (using Mailgun_ by default, but switchable)
|
||||||
* Media storage using Amazon S3
|
* Media storage using Amazon S3
|
||||||
* Docker support using docker-compose_ for development and production
|
* Docker support using docker-compose_ for development and production
|
||||||
* Procfile_ for deploying to Heroku
|
* Procfile_ for deploying to Heroku
|
||||||
|
@ -64,6 +64,7 @@ Optional Integrations
|
||||||
.. _Mailgun: https://mailgun.com/
|
.. _Mailgun: https://mailgun.com/
|
||||||
.. _Whitenoise: https://whitenoise.readthedocs.io/
|
.. _Whitenoise: https://whitenoise.readthedocs.io/
|
||||||
.. _Celery: http://www.celeryproject.org/
|
.. _Celery: http://www.celeryproject.org/
|
||||||
|
.. _Anymail: https://github.com/anymail/django-anymail
|
||||||
.. _MailHog: https://github.com/mailhog/MailHog
|
.. _MailHog: https://github.com/mailhog/MailHog
|
||||||
.. _Sentry: https://getsentry.com
|
.. _Sentry: https://getsentry.com
|
||||||
.. _NewRelic: https://newrelic.com
|
.. _NewRelic: https://newrelic.com
|
||||||
|
|
|
@ -155,12 +155,20 @@ INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
||||||
default='{{cookiecutter.project_name}} <noreply@{{cookiecutter.domain_name}}>')
|
default='{{cookiecutter.project_name}} <noreply@{{cookiecutter.domain_name}}>')
|
||||||
EMAIL_BACKEND = 'django_mailgun.MailgunBackend'
|
|
||||||
MAILGUN_ACCESS_KEY = env('DJANGO_MAILGUN_API_KEY')
|
|
||||||
MAILGUN_SERVER_NAME = env('DJANGO_MAILGUN_SERVER_NAME')
|
|
||||||
EMAIL_SUBJECT_PREFIX = env('DJANGO_EMAIL_SUBJECT_PREFIX', default='[{{cookiecutter.project_name}}] ')
|
EMAIL_SUBJECT_PREFIX = env('DJANGO_EMAIL_SUBJECT_PREFIX', default='[{{cookiecutter.project_name}}] ')
|
||||||
SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL)
|
SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL)
|
||||||
|
|
||||||
|
# Anymail with Mailgun
|
||||||
|
INSTALLED_APPS += ("anymail", )
|
||||||
|
ANYMAIL = {
|
||||||
|
"MAILGUN_API_KEY": env('DJANGO_MAILGUN_API_KEY'),
|
||||||
|
}
|
||||||
|
EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend"
|
||||||
|
|
||||||
{% if cookiecutter.use_newrelic == 'y'-%}
|
{% if cookiecutter.use_newrelic == 'y'-%}
|
||||||
|
|
||||||
|
# NEW RELIC
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
NEW_RELIC_LICENSE_KEY = env('NEW_RELIC_LICENSE_KEY')
|
NEW_RELIC_LICENSE_KEY = env('NEW_RELIC_LICENSE_KEY')
|
||||||
NEW_RELIC_APP_NAME = env('NEW_RELIC_APP_NAME')
|
NEW_RELIC_APP_NAME = env('NEW_RELIC_APP_NAME')
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -9,7 +9,6 @@ DJANGO_AWS_ACCESS_KEY_ID=
|
||||||
DJANGO_AWS_SECRET_ACCESS_KEY=
|
DJANGO_AWS_SECRET_ACCESS_KEY=
|
||||||
DJANGO_AWS_STORAGE_BUCKET_NAME=
|
DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||||
DJANGO_MAILGUN_API_KEY=
|
DJANGO_MAILGUN_API_KEY=
|
||||||
DJANGO_MAILGUN_SERVER_NAME=
|
|
||||||
DJANGO_SERVER_EMAIL=
|
DJANGO_SERVER_EMAIL=
|
||||||
DJANGO_SECURE_SSL_REDIRECT=False
|
DJANGO_SECURE_SSL_REDIRECT=False
|
||||||
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
||||||
|
|
|
@ -22,9 +22,9 @@ django-storages-redux==1.3.2
|
||||||
Collectfast==0.2.3
|
Collectfast==0.2.3
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Mailgun Support
|
# Email backends for Mailgun, Postmark, SendGrid and more
|
||||||
# ---------------
|
# -------------------------------------------------------
|
||||||
django-mailgun==0.9.1
|
django-anymail==0.3.1
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry == "y" -%}
|
{% if cookiecutter.use_sentry == "y" -%}
|
||||||
# Raven is the Sentry client
|
# Raven is the Sentry client
|
||||||
|
|
Loading…
Reference in New Issue
Block a user