Skip to content

Commit

Permalink
update for new heroku db env methodology
Browse files Browse the repository at this point in the history
  • Loading branch information
sbronstein committed Jun 2, 2012
1 parent a877ab6 commit 507366b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
*.db
*.pyc
.DS_Store
.DS_Store
venv
Binary file removed klingsbo/__init__.pyc
Binary file not shown.
16 changes: 5 additions & 11 deletions klingsbo/settings.py
Expand Up @@ -30,17 +30,11 @@
}
}
except:
# example dev config with postgres
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'klingsbo', # Or path to database file if using sqlite3.
'USER': 'klingsbo', # Not used with sqlite3.
'PASSWORD': 'klingsbo', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}

# the new Heroku way
import dj_database_url
DATABASES = {'default': dj_database_url.config(default='postgres://klingsbo:klingsbo@localhost/klingsbo')}


# example dev config w sqlite
#DATABASES = {
Expand Down
Binary file removed klingsbo/wsgi.pyc
Binary file not shown.

0 comments on commit 507366b

Please sign in to comment.