Skip to content
Snippets Groups Projects
Commit 0512577a authored by Kenneth Reitz's avatar Kenneth Reitz
Browse files

Merge branch 'master' of https://github.com/dpaola2/heroku-buildpack-python into develop

parents ef0568d1 6a05ef1d
No related branches found
No related tags found
No related merge requests found
......@@ -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':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment