routing.py
8 lines
| 405 B
| text/x-python
|
PythonLexer
/ realtime / routing.py
r0 | from channels.routing import route | |||
from plotter.consumers import ws_connect, ws_disconnect, ws_message | ||||
channel_routing = [ | ||||
route("websocket.connect", ws_connect, path=r'^/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'), | ||||
route("websocket.receive", ws_message, path=r'^/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'), | ||||
route("websocket.disconnect", ws_disconnect, path=r'^/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'), | ||||
r2 | ] | |||