mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Updates to anymail 0.5 and adds new config setting for MAILGUN_SENDER_DOMAIN
This commit is contained in:
parent
a950eb82f6
commit
3d25befb3f
|
@ -2,6 +2,10 @@
|
||||||
All enhancements and patches to Cookiecutter Django will be documented in this file.
|
All enhancements and patches to Cookiecutter Django will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
##[2016-09-22]
|
||||||
|
### Added
|
||||||
|
- New setting MAILGUN_SENDER_DOMAIN to allow sending mail from any domain other than those registered with mailgun (@jangeador)
|
||||||
|
|
||||||
##[2016-09-10]
|
##[2016-09-10]
|
||||||
### Changed
|
### Changed
|
||||||
- Use app registry instead of INSTALLED_APPS to discover celery tasks (@dhepper)
|
- Use app registry instead of INSTALLED_APPS to discover celery tasks (@dhepper)
|
||||||
|
|
|
@ -27,9 +27,10 @@ You can either push the 'deploy' button in your generated README.rst or run thes
|
||||||
|
|
||||||
heroku config:set DJANGO_MAILGUN_SERVER_NAME=YOUR_MALGUN_SERVER
|
heroku config:set DJANGO_MAILGUN_SERVER_NAME=YOUR_MALGUN_SERVER
|
||||||
heroku config:set DJANGO_MAILGUN_API_KEY=YOUR_MAILGUN_API_KEY
|
heroku config:set DJANGO_MAILGUN_API_KEY=YOUR_MAILGUN_API_KEY
|
||||||
|
heroku config:set MAILGUN_SENDER_DOMAIN=YOUR_MAILGUN_SENDER_DOMAIN
|
||||||
|
|
||||||
heroku config:set PYTHONHASHSEED=random
|
heroku config:set PYTHONHASHSEED=random
|
||||||
heroku config:set DJANGO_ADMIN_URL=\^somelocation/
|
heroku config:set DJANGO_ADMIN_URL=\^somelocation/
|
||||||
|
|
||||||
git push heroku master
|
git push heroku master
|
||||||
heroku run python manage.py migrate
|
heroku run python manage.py migrate
|
||||||
|
|
|
@ -69,6 +69,7 @@ Add these exports
|
||||||
export DJANGO_ADMIN_URL='<not admin/>'
|
export DJANGO_ADMIN_URL='<not admin/>'
|
||||||
export DJANGO_MAILGUN_API_KEY='<mailgun key>'
|
export DJANGO_MAILGUN_API_KEY='<mailgun key>'
|
||||||
export DJANGO_MAILGUN_SERVER_NAME='<mailgun server name>'
|
export DJANGO_MAILGUN_SERVER_NAME='<mailgun server name>'
|
||||||
|
export MAILGUN_SENDER_DOMAIN='<mailgun sender domain (e.g. mg.yourdomain.com)>'
|
||||||
export DJANGO_AWS_ACCESS_KEY_ID=
|
export DJANGO_AWS_ACCESS_KEY_ID=
|
||||||
export DJANGO_AWS_SECRET_ACCESS_KEY=
|
export DJANGO_AWS_SECRET_ACCESS_KEY=
|
||||||
export DJANGO_AWS_STORAGE_BUCKET_NAME=
|
export DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||||
|
@ -84,7 +85,7 @@ Go to the PythonAnywhere **Databases tab** and configure your database.
|
||||||
|
|
||||||
* For Postgres, setup your superuser password, then open a Postgres console and run a `CREATE DATABASE my-db-name`. You should probably also set up a specific role and permissions for your app, rather than using the superuser credentials. Make a note of the address and port of your postgres server.
|
* For Postgres, setup your superuser password, then open a Postgres console and run a `CREATE DATABASE my-db-name`. You should probably also set up a specific role and permissions for your app, rather than using the superuser credentials. Make a note of the address and port of your postgres server.
|
||||||
|
|
||||||
* For MySQL, set the password and create a database. More info here: https://help.pythonanywhere.com/pages/UsingMySQL
|
* For MySQL, set the password and create a database. More info here: https://help.pythonanywhere.com/pages/UsingMySQL
|
||||||
|
|
||||||
* You can also use sqlite if you like! Not recommended for anything beyond toy projects though.
|
* You can also use sqlite if you like! Not recommended for anything beyond toy projects though.
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ DJANGO_SENTRY_CLIENT SENTRY_CLIENT n/a
|
||||||
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
|
DJANGO_SENTRY_LOG_LEVEL SENTRY_LOG_LEVEL n/a logging.INFO
|
||||||
DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error
|
DJANGO_MAILGUN_API_KEY MAILGUN_ACCESS_KEY n/a raises error
|
||||||
DJANGO_MAILGUN_SERVER_NAME MAILGUN_SERVER_NAME 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
|
||||||
NEW_RELIC_APP_NAME NEW_RELIC_APP_NAME 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
|
NEW_RELIC_LICENSE_KEY NEW_RELIC_LICENSE_KEY n/a raises error
|
||||||
DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a raises error
|
DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a raises error
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
"DJANGO_AWS_SECRET_ACCESS_KEY": "",
|
"DJANGO_AWS_SECRET_ACCESS_KEY": "",
|
||||||
"DJANGO_AWS_STORAGE_BUCKET_NAME": "",
|
"DJANGO_AWS_STORAGE_BUCKET_NAME": "",
|
||||||
"DJANGO_MAILGUN_SERVER_NAME": "",
|
"DJANGO_MAILGUN_SERVER_NAME": "",
|
||||||
"DJANGO_MAILGUN_API_KEY": ""{% if cookiecutter.use_sentry_for_error_reporting == "y" -%},
|
"DJANGO_MAILGUN_API_KEY": ""
|
||||||
|
"MAILGUN_SENDER_DOMAIN": ""{% if cookiecutter.use_sentry_for_error_reporting == "y" -%},
|
||||||
"DJANGO_SENTRY_DSN": ""{%- endif %}
|
"DJANGO_SENTRY_DSN": ""{%- endif %}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -163,6 +163,7 @@ SERVER_EMAIL = env('DJANGO_SERVER_EMAIL', default=DEFAULT_FROM_EMAIL)
|
||||||
INSTALLED_APPS += ("anymail", )
|
INSTALLED_APPS += ("anymail", )
|
||||||
ANYMAIL = {
|
ANYMAIL = {
|
||||||
"MAILGUN_API_KEY": env('DJANGO_MAILGUN_API_KEY'),
|
"MAILGUN_API_KEY": env('DJANGO_MAILGUN_API_KEY'),
|
||||||
|
"MAILGUN_SENDER_DOMAIN": env('MAILGUN_SENDER_DOMAIN')
|
||||||
}
|
}
|
||||||
EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend"
|
EMAIL_BACKEND = "anymail.backends.mailgun.MailgunBackend"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||||
# Used with email
|
# Used with email
|
||||||
DJANGO_MAILGUN_API_KEY=
|
DJANGO_MAILGUN_API_KEY=
|
||||||
DJANGO_SERVER_EMAIL=
|
DJANGO_SERVER_EMAIL=
|
||||||
|
MAILGUN_SENDER_DOMAIN=
|
||||||
|
|
||||||
# Security! Better to use DNS for this task, but you can use redirect
|
# Security! Better to use DNS for this task, but you can use redirect
|
||||||
DJANGO_SECURE_SSL_REDIRECT=False
|
DJANGO_SECURE_SSL_REDIRECT=False
|
||||||
|
@ -33,4 +34,4 @@ DJANGO_OPBEAT_SECRET_TOKEN
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if cookiecutter.use_compressor == 'y' -%}
|
{% if cookiecutter.use_compressor == 'y' -%}
|
||||||
COMPRESS_ENABLED=
|
COMPRESS_ENABLED=
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -24,7 +24,7 @@ Collectfast==0.2.3
|
||||||
|
|
||||||
# Email backends for Mailgun, Postmark, SendGrid and more
|
# Email backends for Mailgun, Postmark, SendGrid and more
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
django-anymail==0.4.2
|
django-anymail==0.5
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
||||||
# Raven is the Sentry client
|
# Raven is the Sentry client
|
||||||
|
|
Loading…
Reference in New Issue
Block a user