Skip to content

Commit

Permalink
Merge pull request jazzband#10 from cberner/master
Browse files Browse the repository at this point in the history
This patch fixes the way urls are parsed to support blank passwords, usernames, hostnames...etc. This is particularly important in dev environments with Postgres, where blank passwords currently don't work
  • Loading branch information
kennethreitz committed Jan 8, 2014
2 parents de1545c + 18a9905 commit 19d7c8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dj_database_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def parse(url):

# Update with environment configuration.
config.update({
'NAME': path,
'USER': url.username,
'PASSWORD': url.password,
'HOST': url.hostname,
'PORT': url.port,
'NAME': path or '',
'USER': url.username or '',
'PASSWORD': url.password or '',
'HOST': url.hostname or '',
'PORT': url.port or '',
})

if url.scheme in SCHEMES:
Expand Down

0 comments on commit 19d7c8f

Please sign in to comment.