Skip to content

Commit

Permalink
tweaking settings for compatibility with heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
benadida committed Sep 15, 2013
1 parent 2d15a8e commit d375bd4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
web: gunicorn heliosserver.wsgi:application -b 0.0.0.0:8000
web: gunicorn wsgi:application
worker: python manage.py celeryd -E -B --beat
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-2.7.5
5 changes: 5 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ def get_from_env(var, default):
}
}

# override if we have an env variable
if get_from_env('DATABASE_URL', None):
import dj_database_url
DATABASES['default'] = dj_database_url.config()

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
Expand Down

0 comments on commit d375bd4

Please sign in to comment.