1 min readAug 1, 2020
Hey Marvin Kweyu, if we don’t pass any options
into dj-database-url, then it won’t create that key. Hence, your error.
Maybe a better approach would be:
options = DATABASES['default'].get('OPTIONS', {})
options.pop('sslmode', None)
I’ll update that section of the article so it’ll work no matter what options people use. Thanks for pointing it out!