From 3c362014b0c2bb4da178ddd6f1573eb063ae766c Mon Sep 17 00:00:00 2001 From: Basile Clement Date: Sun, 13 Nov 2016 12:22:48 +0100 Subject: [PATCH] =?UTF-8?q?Remplace=20simplejson=20par=20json=20de=20la=20?= =?UTF-8?q?biblioth=C3=A8que=20standard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestioncof/petits_cours_views.py | 6 +++--- requirements.txt | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index e9fe511e..c3e43ea8 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -30,7 +30,7 @@ from captcha.fields import ReCaptchaField from datetime import datetime import base64 -import simplejson +import json def render_template(template_path, data): @@ -153,7 +153,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for, "proposed_mails": proposed_mails, "mainmail": mainmail, "attribdata": - base64.b64encode(simplejson.dumps(attribdata) + base64.b64encode(json.dumps(attribdata) .encode('utf_8')), "redo": redo, "errors": errors, @@ -262,7 +262,7 @@ def _traitement_post(request, demande): extra = request.POST["extra"].strip() redo = "redo" in request.POST attribdata = request.POST["attribdata"] - attribdata = dict(simplejson.loads(base64.b64decode(attribdata))) + attribdata = dict(json.loads(base64.b64decode(attribdata))) for matiere in demande.matieres.all(): if matiere.id not in attribdata: unsatisfied.append(matiere) diff --git a/requirements.txt b/requirements.txt index 23f4d618..f7f6deca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,6 @@ django-grappelli==2.8.1 django-recaptcha==1.0.5 mysqlclient==1.3.7 Pillow==3.3.0 -simplejson==3.8.2 six==1.10.0 unicodecsv==0.14.1 icalendar==3.10