mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-23 15:54:12 +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_
|
||||
* Comes with custom user model ready to go.
|
||||
* 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
|
||||
* Docker support using docker-compose_ for development and production
|
||||
* Procfile_ for deploying to Heroku
|
||||
|
@ -64,6 +64,7 @@ Optional Integrations
|
|||
.. _Mailgun: https://mailgun.com/
|
||||
.. _Whitenoise: https://whitenoise.readthedocs.io/
|
||||
.. _Celery: http://www.celeryproject.org/
|
||||
.. _Anymail: https://github.com/anymail/django-anymail
|
||||
.. _MailHog: https://github.com/mailhog/MailHog
|
||||
.. _Sentry: https://getsentry.com
|
||||
.. _NewRelic: https://newrelic.com
|
||||
|
|
|
@ -155,12 +155,20 @@ INSTALLED_APPS = ('collectfast', ) + INSTALLED_APPS
|
|||
# ------------------------------------------------------------------------------
|
||||
DEFAULT_FROM_EMAIL = env('DJANGO_DEFAULT_FROM_EMAIL',
|
||||
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}}] ')
|
||||
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'-%}
|
||||
|
||||
# NEW RELIC
|
||||
# ------------------------------------------------------------------------------
|
||||
NEW_RELIC_LICENSE_KEY = env('NEW_RELIC_LICENSE_KEY')
|
||||
NEW_RELIC_APP_NAME = env('NEW_RELIC_APP_NAME')
|
||||
{%- endif %}
|
||||
|
|
|
@ -9,7 +9,6 @@ DJANGO_AWS_ACCESS_KEY_ID=
|
|||
DJANGO_AWS_SECRET_ACCESS_KEY=
|
||||
DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||
DJANGO_MAILGUN_API_KEY=
|
||||
DJANGO_MAILGUN_SERVER_NAME=
|
||||
DJANGO_SERVER_EMAIL=
|
||||
DJANGO_SECURE_SSL_REDIRECT=False
|
||||
DJANGO_ACCOUNT_ALLOW_REGISTRATION=True
|
||||
|
|
|
@ -22,9 +22,9 @@ django-storages-redux==1.3.2
|
|||
Collectfast==0.2.3
|
||||
{%- endif %}
|
||||
|
||||
# Mailgun Support
|
||||
# ---------------
|
||||
django-mailgun==0.9.1
|
||||
# Email backends for Mailgun, Postmark, SendGrid and more
|
||||
# -------------------------------------------------------
|
||||
django-anymail==0.3.1
|
||||
|
||||
{% if cookiecutter.use_sentry == "y" -%}
|
||||
# Raven is the Sentry client
|
||||
|
|
Loading…
Reference in New Issue
Block a user