dj-database-url: heroku+django+mysql: sslmode not supported.
Based on docs: there’s no ‘sslmode’ attribute. The following code gives me the exception: 'sslmode' is an invalid keyword argument
.
This issue is possibly related to other backends like sqlite as well.
Workaround:
On settings.py after:
django_heroku.settings(locals())
add:
del DATABASES['default']['OPTIONS']['sslmode']
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 37
- Comments: 16 (3 by maintainers)
Commits related to this issue
- add workaround to error https://github.com/jacobian/dj-database-url/issues/107 — committed to zhaziragaripolla/StartDeutsch-django by zhaziragaripolla 4 years ago
I got this error: del DATABASES[‘default’][‘OPTIONS’][‘sslmode’] KeyError: ‘OPTIONS’
Thank you very much !
fwiw it looks like
'OPTIONS': {'ssl': True}
is needed for mysql instead of'OPTIONS': {'sslmode': 'require'}
for postgres ref https://stackoverflow.com/q/59894554To fix this error, just use
At the end of the line, No need adding