Merge pull request #254 from AlexejStukov/patch-3

Replaced BindingConsumer with Demultiplexer in routing
This commit is contained in:
Andrew Godwin 2016-07-20 10:47:05 -04:00 committed by GitHub
commit 29530a23b6

View File

@ -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),
] ]