Tell django to use MB4

This commit is contained in:
Sachi King 2017-12-10 14:31:48 +11:00
parent a880bc27fb
commit cb51a2abd8

View file

@ -30,6 +30,8 @@ else:
DATABASES = {}
DATABASES['default'] = dj_database_url.config(conn_max_age=600)
if DATABASES['default']['ENGINE'] == 'django.db.backends.mysql':
DATABASES['default']['OPTIONS'] = {'charset': 'utf8mb4'}
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = os.environ.get('EMAIL_HOST', None)