From dc32ae6ad26e104d71f99bf3967fc5aa9e1d1c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Fri, 23 Dec 2016 09:37:54 +0100 Subject: [PATCH 1/6] =?UTF-8?q?R=C3=A9pare=20le=20traitement=20des=20petit?= =?UTF-8?q?s=20cours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Les fonctions de traitement des demandes faisaient des cast étranges à l'aide de `base64`. Ça devrait être lié à python2 je suppose. --- gestioncof/petits_cours_views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index 303cec2c..ee71d1a9 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -146,9 +146,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for, "proposed_for": proposed_for, "proposed_mails": proposed_mails, "mainmail": mainmail, - "attribdata": - base64.b64encode(json.dumps(attribdata) - .encode('utf_8')), + "attribdata": json.dumps(attribdata), "redo": redo, "errors": errors, }) @@ -258,7 +256,7 @@ def _traitement_post(request, demande): extra = request.POST["extra"].strip() redo = "redo" in request.POST attribdata = request.POST["attribdata"] - attribdata = dict(json.loads(base64.b64decode(attribdata))) + attribdata = dict(json.loads(attribdata)) for matiere in demande.matieres.all(): if matiere.id not in attribdata: unsatisfied.append(matiere) From 06370bc62a02973cf3ce025db4758b0a13eb3631 Mon Sep 17 00:00:00 2001 From: Erkan Narmanli Date: Tue, 3 Jan 2017 02:13:42 +0100 Subject: [PATCH 2/6] Update README.md for new kfet fixtures --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db2cc93b..e7056f1e 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ Il ne vous reste plus qu'à initialiser les modèles de Django avec la commande Une base de donnée pré-remplie est disponible en lançant la commande : - python manage.py loaddata users root bda gestion sites + python manage.py loaddata users root bda gestion sites accounts groups articles Vous êtes prêts à développer ! Lancer GestioCOF en faisant From 9cb5844c48ac83307f503a7407747a27a7d7713f Mon Sep 17 00:00:00 2001 From: Qwann Date: Tue, 3 Jan 2017 02:19:50 +0100 Subject: [PATCH 3/6] Revert "Update README.md for new kfet fixtures" This reverts commit 06370bc62a02973cf3ce025db4758b0a13eb3631. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7056f1e..db2cc93b 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ Il ne vous reste plus qu'à initialiser les modèles de Django avec la commande Une base de donnée pré-remplie est disponible en lançant la commande : - python manage.py loaddata users root bda gestion sites accounts groups articles + python manage.py loaddata users root bda gestion sites Vous êtes prêts à développer ! Lancer GestioCOF en faisant From bc5a323dfe94971791ed0055f51946f20e9b7d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Wed, 4 Jan 2017 15:29:28 +0100 Subject: [PATCH 4/6] Add missing migration --- kfet/migrations/0047_auto_20170104_1528.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 kfet/migrations/0047_auto_20170104_1528.py diff --git a/kfet/migrations/0047_auto_20170104_1528.py b/kfet/migrations/0047_auto_20170104_1528.py new file mode 100644 index 00000000..d59447af --- /dev/null +++ b/kfet/migrations/0047_auto_20170104_1528.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('kfet', '0046_account_created_at'), + ] + + operations = [ + migrations.AlterField( + model_name='account', + name='promo', + field=models.IntegerField(blank=True, choices=[(1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017)], default=2016, null=True), + ), + ] From e292318245584f8de3fa8dab35004347bdd3d5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Thu, 5 Jan 2017 14:27:25 +0100 Subject: [PATCH 5/6] Fix WebSocket failure on K-Psul --- kfet/routing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kfet/routing.py b/kfet/routing.py index 63e0c963..5ea343cb 100644 --- a/kfet/routing.py +++ b/kfet/routing.py @@ -8,5 +8,5 @@ from channels.routing import route, route_class from kfet import consumers channel_routing = [ - route_class(consumers.KPsul, path=r"^ws/k-fet/k-psul/$"), + route_class(consumers.KPsul, path=r"^/ws/k-fet/k-psul/$"), ] From d6542d8b217d929a5bdc15b1ce04e3ae79c5fa45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Thu, 5 Jan 2017 15:52:25 +0100 Subject: [PATCH 6/6] Fix websocket for dev and www Le ProxyPass ignorait apparemment le header `Daphne-Root-Path` --- provisioning/apache.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioning/apache.conf b/provisioning/apache.conf index cc815592..db5bd602 100644 --- a/provisioning/apache.conf +++ b/provisioning/apache.conf @@ -10,7 +10,7 @@ # place des lignes suivantes: # # RequestHeader set Daphne-Root-Path /gestion - # ProxyPass /gestion/ws/ ws://127.0.0.1:8001/gestion/ws/ + # ProxyPass /gestion/ws/ ws://127.0.0.1:8001/ws/ # ProxyPass /gestion http://127.0.0.1:8001/gestion # ProxyPassReverse /gestion http://127.0.0.1:8001/gestion #