mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-10 19:57:09 +03:00
Merge pull request #1545 from browniebroke/simplify-environment
Simplify Mailgun settings
This commit is contained in:
commit
078041cdb1
|
@ -27,10 +27,6 @@ Run these commands to deploy the project to Heroku:
|
|||
heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY_HERE
|
||||
heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME=YOUR_AWS_S3_BUCKET_NAME_HERE
|
||||
|
||||
heroku config:set DJANGO_MAILGUN_SERVER_NAME=YOUR_MALGUN_SERVER
|
||||
heroku config:set DJANGO_MAILGUN_API_KEY=YOUR_MAILGUN_API_KEY
|
||||
heroku config:set MAILGUN_SENDER_DOMAIN=YOUR_MAILGUN_SENDER_DOMAIN
|
||||
|
||||
# This is to be set only if you're using Sentry:
|
||||
heroku config:set DJANGO_SENTRY_DSN=YOUR_SENTRY_DSN
|
||||
|
||||
|
|
|
@ -68,9 +68,8 @@ Add these exports
|
|||
export DJANGO_SECRET_KEY='<secret key goes here>'
|
||||
export DJANGO_ALLOWED_HOSTS='<www.your-domain.com>'
|
||||
export DJANGO_ADMIN_URL='<not admin/>'
|
||||
export DJANGO_MAILGUN_API_KEY='<mailgun key>'
|
||||
export DJANGO_MAILGUN_SERVER_NAME='<mailgun server name>'
|
||||
export MAILGUN_SENDER_DOMAIN='<mailgun sender domain (e.g. mg.yourdomain.com)>'
|
||||
export MAILGUN_API_KEY='<mailgun key>'
|
||||
export MAILGUN_DOMAIN='<mailgun sender domain (e.g. mg.yourdomain.com)>'
|
||||
export DJANGO_AWS_ACCESS_KEY_ID=
|
||||
export DJANGO_AWS_SECRET_ACCESS_KEY=
|
||||
export DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||
|
@ -139,9 +138,8 @@ Click through to the **WSGI configuration file** link (near the top) and edit th
|
|||
os.environ['DJANGO_SECRET_KEY'] = '<as above>'
|
||||
os.environ['DJANGO_ALLOWED_HOSTS'] = '<as above>'
|
||||
os.environ['DJANGO_ADMIN_URL'] = '<as above>'
|
||||
os.environ['DJANGO_MAILGUN_API_KEY'] = '<as above>'
|
||||
os.environ['DJANGO_MAILGUN_SERVER_NAME'] = '<as above>'
|
||||
os.environ['MAILGUN_SENDER_DOMAIN'] = '<as above>'
|
||||
os.environ['MAILGUN_API_KEY'] = '<as above>'
|
||||
os.environ['MAILGUN_DOMAIN'] = '<as above>'
|
||||
os.environ['DJANGO_AWS_ACCESS_KEY_ID'] = ''
|
||||
os.environ['DJANGO_AWS_SECRET_ACCESS_KEY'] = ''
|
||||
os.environ['DJANGO_AWS_STORAGE_BUCKET_NAME'] = ''
|
||||
|
|
|
@ -47,9 +47,8 @@ DJANGO_AWS_STORAGE_BUCKET_NAME AWS_STORAGE_BUCKET_NAME n/a
|
|||
DJANGO_SENTRY_DSN SENTRY_DSN n/a raises error
|
||||
DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a raven.contrib.django.raven_compat.DjangoClient
|
||||
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
|
||||
DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error
|
||||
DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_NAME n/a raises error
|
||||
MAILGUN_SENDER_DOMAIN MAILGUN_SENDER_DOMAIN n/a raises error
|
||||
MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error
|
||||
MAILGUN_DOMAIN MAILGUN_SENDER_DOMAIN n/a raises error
|
||||
NEW_RELIC_APP_NAME NEW_RELIC_APP_NAME n/a raises error
|
||||
NEW_RELIC_LICENSE_KEY NEW_RELIC_LICENSE_KEY n/a raises error
|
||||
DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a raises error
|
||||
|
|
|
@ -152,8 +152,8 @@ 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'),
|
||||
'MAILGUN_SENDER_DOMAIN': env('MAILGUN_SENDER_DOMAIN')
|
||||
'MAILGUN_API_KEY': env('MAILGUN_API_KEY'),
|
||||
'MAILGUN_SENDER_DOMAIN': env('MAILGUN_DOMAIN')
|
||||
}
|
||||
EMAIL_BACKEND = 'anymail.backends.mailgun.EmailBackend'
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ DJANGO_AWS_SECRET_ACCESS_KEY=
|
|||
DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||
|
||||
# Used with email
|
||||
DJANGO_MAILGUN_API_KEY=
|
||||
MAILGUN_API_KEY=
|
||||
DJANGO_SERVER_EMAIL=
|
||||
MAILGUN_SENDER_DOMAIN=
|
||||
MAILGUN_DOMAIN=
|
||||
|
||||
# Security! Better to use DNS for this task, but you can use redirect
|
||||
DJANGO_SECURE_SSL_REDIRECT=False
|
||||
|
|
Loading…
Reference in New Issue
Block a user