kfet.open

kfet.open app
- Base data (raw_open, last_update...) is stored and shared through cache system.
- 2 websockets groups: one for team users, one for other users.
- UI is initialized and kept up-to-date with WS.
- raw_open and force_close can be updated with standard HTTP requests.
  At this time, there isn't any restriction on raw_open view. Common sense tell us
  to change this behavior.

Misc
- Clean channels routing.
- 'PermConsumerMixin': user who sent the message is available as argument in
connection_groups method, which returns groups to which the user should be
appended on websocket connection (and discarded on disconnection).
- New kfet.utils module: should be used for mixins, whatever is useful and not concerns
the kfet app.
- Clean JS dependencies.
This commit is contained in:
Aurélien Delobelle 2017-06-21 07:08:28 +02:00
parent 2381af92e3
commit b8110c11a4
37 changed files with 852 additions and 404 deletions

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from django.conf.urls import url
from django.conf.urls import include, url
from django.contrib.auth.decorators import permission_required
from kfet import views
from kfet import autocomplete
@ -198,17 +198,6 @@ urlpatterns = [
(views.SettingsUpdate.as_view()),
name='kfet.settings.update'),
# -----
# K-Fêt Open urls
# -----
url('^kfet_open/$',
views.UpdateKfetOpen.as_view(),
name='kfet.kfet_open'),
url('^kfet_close/$',
permission_required('kfet.can_force_close')
(views.UpdateForceClose.as_view()),
name='kfet.force_close'),
# -----
# Transfers urls
@ -254,3 +243,8 @@ urlpatterns = [
url(r'^orders/(?P<pk>\d+)/to_inventory$', views.order_to_inventory,
name='kfet.order.to_inventory'),
]
urlpatterns += [
# K-Fêt Open urls
url('^open/', include('kfet.open.urls')),
]