2016-09-17 22:26:23 +02:00
|
|
|
from channels.routing import include, route
|
2016-05-29 08:29:14 +02:00
|
|
|
|
2016-09-17 22:26:23 +02:00
|
|
|
from openslides.utils.autoupdate import (
|
|
|
|
send_data,
|
|
|
|
ws_add_projector,
|
|
|
|
ws_add_site,
|
|
|
|
ws_disconnect_projector,
|
|
|
|
ws_disconnect_site,
|
|
|
|
)
|
|
|
|
|
|
|
|
projector_routing = [
|
|
|
|
route("websocket.connect", ws_add_projector),
|
|
|
|
route("websocket.disconnect", ws_disconnect_projector),
|
|
|
|
]
|
|
|
|
|
|
|
|
site_routing = [
|
|
|
|
route("websocket.connect", ws_add_site),
|
|
|
|
route("websocket.disconnect", ws_disconnect_site),
|
|
|
|
]
|
2016-05-29 08:29:14 +02:00
|
|
|
|
|
|
|
channel_routing = [
|
2016-09-17 22:26:23 +02:00
|
|
|
include(projector_routing, path=r'^/ws/projector/(?P<projector_id>\d+)/$'),
|
|
|
|
include(site_routing, path=r'^/ws/site/$'),
|
2016-05-29 08:29:14 +02:00
|
|
|
route("autoupdate.send_data", send_data),
|
|
|
|
]
|