Update channels configuration

This commit is contained in:
Iacopo Spalletti 2016-06-05 22:49:17 +02:00
parent eb5d98c9e3
commit d9dd192ca8
No known key found for this signature in database
GPG key ID: BDCBC2EB289F60C6
2 changed files with 15 additions and 1 deletions

View file

@ -110,10 +110,12 @@ except ImportError:
try:
import knocker # pragma: no cover # NOQA
HELPER_SETTINGS['INSTALLED_APPS'].append('knocker')
HELPER_SETTINGS['INSTALLED_APPS'].append('channels')
HELPER_SETTINGS['INSTALLED_APPS'].append('djangocms_blog.liveblog',)
HELPER_SETTINGS['CHANNEL_LAYERS'] = {
'default': {
'BACKEND': 'asgiref.inmemory.ChannelLayer',
'ROUTING': 'knocker.routing.channel_routing',
'ROUTING': 'tests.test_utils.routing.channel_routing',
},
}
except ImportError:

View file

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from channels import include
from djangocms_blog.liveblog.routing import channel_routing as djangocms_blog_routing
from knocker.routing import channel_routing as knocker_routing
channel_routing = [
include(djangocms_blog_routing, path=r'^/liveblog'),
include(knocker_routing, path=r'^/knocker'),
]