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 from kfet import consumers
channel_routing = [ 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.connect", ws_kpsul_history_connect),
#route('websocket.receive', ws_message) #route('websocket.receive', ws_message)
] ]

View file

@ -1059,7 +1059,7 @@ $(document).ready(function() {
websocket_msg_default = {'opegroups':[],'opes':[],'checkouts':[],'articles':[]} 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) { socket.onmessage = function(e) {
data = $.extend({}, websocket_msg_default, JSON.parse(e.data)); data = $.extend({}, websocket_msg_default, JSON.parse(e.data));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,64 +0,0 @@
//! moment.js locale configuration
//! locale : French [fr]
//! author : John Fischer : https://github.com/jfroffice
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
var fr = moment.defineLocale('fr', {
months : 'Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Août_Septembre_Octobre_Novembre_Décembre'.split('_'),
monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
monthsParseExact : true,
weekdays : 'Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi'.split('_'),
weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[Aujourd\'hui à] LT',
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L'
},
relativeTime : {
future : 'dans %s',
past : 'il y a %s',
s : 'quelques secondes',
m : 'une minute',
mm : '%d minutes',
h : 'une heure',
hh : '%d heures',
d : 'un jour',
dd : '%d jours',
M : 'un mois',
MM : '%d mois',
y : 'un an',
yy : '%d ans'
},
ordinalParse: /\d{1,2}(er|)/,
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return fr;
}));

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff