##// END OF EJS Templates
New template, clean code, workig for realtime
New template, clean code, workig for realtime

File last commit:

r21:dc5f8680b6e1
r21:dc5f8680b6e1
Show More
routing.py
7 lines | 449 B | text/x-python | PythonLexer
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<id>[a-z]+)/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'),
route("websocket.receive", ws_message, path=r'^/(?P<id>[a-z]+)/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'),
route("websocket.disconnect", ws_disconnect, path=r'^/(?P<id>[a-z]+)/(?P<code>[0-9]+)/(?P<plot>[a-z]+)/$'),
]