Ajout /ws/ for websocket path

This commit is contained in:
Aurélien Delobelle 2016-09-03 01:21:49 +02:00
parent 9aa0e8b89d
commit 7bfd2e2f9a
7 changed files with 2 additions and 5471 deletions

View file

@ -8,7 +8,7 @@ from channels.routing import route, route_class
from kfet import consumers
channel_routing = [
route_class(consumers.KPsul, path=r"^/k-fet/k-psul/$"),
route_class(consumers.KPsul, path=r"^/ws/k-fet/k-psul/$"),
#route("websocket.connect", ws_kpsul_history_connect),
#route('websocket.receive', ws_message)
]

View file

@ -1059,7 +1059,7 @@ $(document).ready(function() {
websocket_msg_default = {'opegroups':[],'opes':[],'checkouts':[],'articles':[]}
socket = new ReconnectingWebSocket("ws://" + window.location.host + "/k-fet/k-psul/");
socket = new ReconnectingWebSocket("ws://" + window.location.host + "/ws/k-fet/k-psul/");
socket.onmessage = function(e) {
data = $.extend({}, websocket_msg_default, JSON.parse(e.data));