Skip to content

Commit

Permalink
configure urlparse near import
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Zoschke committed Sep 12, 2011
1 parent a42f3ab commit fef7f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/compile
Expand Up @@ -46,10 +46,10 @@ if [ "$NAME" = "Python/Django" ]; then

cat >>$SETTINGS_FILE <<EOF
import os, urlparse
urlparse.uses_netloc.append('postgres')
urlparse.uses_netloc.append('mysql')
try:
if os.environ.has_key('DATABASE_URL'):
urlparse.uses_netloc.append('postgres')
urlparse.uses_netloc.append('mysql')
url = urlparse.urlparse(os.environ['DATABASE_URL'])
DATABASES['default'] = {
'NAME': url.path[1:],
Expand Down

0 comments on commit fef7f64

Please sign in to comment.