Skip to content

Commit

Permalink
Merge pull request heroku-python#31 from mattstibbs/patch-1
Browse files Browse the repository at this point in the history
Add support for Heroku Redis
  • Loading branch information
singingwolfboy committed Mar 13, 2016
2 parents 6b1525c + ff31f3c commit 1962cbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flask_heroku.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ def init_app(self, app):
app.config.setdefault('MAIL_PASSWORD', environ.get('POSTMARK_API_KEY'))
app.config.setdefault('MAIL_USE_TLS', True)

# Heroku Redis
redis_url = environ.get('REDIS_URL')
if redis_url:
url = urlparse(redis_url)
app.config.setdefault('REDIS_HOST', url.hostname)
app.config.setdefault('REDIS_PORT', url.port)
app.config.setdefault('REDIS_PASSWORD', url.password)

# Redis To Go
redis_url = environ.get('REDISTOGO_URL')
if redis_url:
Expand Down

0 comments on commit 1962cbb

Please sign in to comment.