mirror of
https://github.com/django/daphne.git
synced 2025-07-10 16:02:18 +03:00
Merge pull request #254 from AlexejStukov/patch-3
Replaced BindingConsumer with Demultiplexer in routing
This commit is contained in:
commit
29530a23b6
|
@ -117,11 +117,11 @@ Tie that into your routing, and tie each demultiplexed channel into the
|
||||||
``.consumer`` attribute of the Binding, and you're ready to go::
|
``.consumer`` attribute of the Binding, and you're ready to go::
|
||||||
|
|
||||||
from channels import route_class
|
from channels import route_class
|
||||||
from .consumers import BindingConsumer
|
from .consumers import Demultiplexer
|
||||||
from .models import IntegerValueBinding
|
from .models import IntegerValueBinding
|
||||||
|
|
||||||
channel_routing = [
|
channel_routing = [
|
||||||
route_class(BindingConsumer, path="^binding/"),
|
route_class(Demultiplexer, path="^/binding/"),
|
||||||
route("binding.intval", IntegerValueBinding.consumer),
|
route("binding.intval", IntegerValueBinding.consumer),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user