Skip to content

Commit

Permalink
Add channels layers
Browse files Browse the repository at this point in the history
  • Loading branch information
overshard committed Oct 20, 2018
1 parent d6987d5 commit c55814b
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
1 change: 1 addition & 0 deletions Pipfile
Expand Up @@ -24,3 +24,4 @@ faker = "*"
ipaddress = "*"
channels = "*"
asgiref = "*"
channels-redis = "*"
54 changes: 53 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions timestrap/settings/development.py
Expand Up @@ -20,6 +20,19 @@
}


# Channels
# https://channels.readthedocs.io/en/latest/

CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
'hosts': [('localhost', 6379)],
},
},
}


# Email

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
13 changes: 13 additions & 0 deletions timestrap/settings/heroku.py
Expand Up @@ -24,6 +24,19 @@
}


# Channels
# https://channels.readthedocs.io/en/latest/

CHANNEL_LAYERS = {
'default': {
'BACKEND': 'channels_redis.core.RedisChannelLayer',
'CONFIG': {
'hosts': [os.environ.get('REDIS_URL')], # noqa: F405
},
},
}


# Email

SENDGRID_USERNAME = os.environ.get('SENDGRID_USERNAME', None) # noqa: F405
Expand Down

0 comments on commit c55814b

Please sign in to comment.