Update channels configuration
This commit is contained in:
parent
eb5d98c9e3
commit
d9dd192ca8
2 changed files with 15 additions and 1 deletions
|
@ -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:
|
||||
|
|
12
tests/test_utils/routing.py
Normal file
12
tests/test_utils/routing.py
Normal 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'),
|
||||
]
|
Loading…
Reference in a new issue