From 6a05ef1d9043303670aaa89eeb774c866ec66c87 Mon Sep 17 00:00:00 2001 From: Dave Paola <dpaola2@gmail.com> Date: Mon, 28 Nov 2011 20:51:30 -0500 Subject: [PATCH] DATABASES uses update() instead of being set explicitly, to preserve options --- bin/compile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/compile b/bin/compile index 190b6454..b90b3af7 100755 --- a/bin/compile +++ b/bin/compile @@ -104,13 +104,15 @@ try: if os.environ.has_key('DATABASE_URL'): url = urlparse.urlparse(os.environ['DATABASE_URL']) - DATABASES['default'] = { + # We use update here to preserve other keys we + # don't care about (like OPTIONS) + DATABASES['default'].update({ 'NAME': url.path[1:], 'USER': url.username, 'PASSWORD': url.password, 'HOST': url.hostname, 'PORT': url.port, - } + }) if url.scheme == 'postgres': DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2' if url.scheme == 'mysql': -- GitLab