Skip to content

Commit

Permalink
pull heroku database url from env
Browse files Browse the repository at this point in the history
  • Loading branch information
deargle committed May 31, 2017
1 parent 82e2373 commit 4ef899e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion psiturk/psiturk_config.py
Expand Up @@ -45,6 +45,7 @@ def load_config(self):
#print 'changed ' + name + ' in ' + section + ' from ' + value + ' to ' + os.environ[name]

# heroku dynamically assigns your app a port, so you can't set the port to a fixed number
# database url is also dynamic
if 'ON_HEROKU' in os.environ:
self.set('Server Parameters', 'port', os.environ['PORT'])

self.set('Database Parameters', 'database_url', os.environ['DATABASE_URL'])

0 comments on commit 4ef899e

Please sign in to comment.