Merge branch 'Elarnon/json' into 'master'

Remplace simplejson par json de la bibliothèque standard



See merge request !115
This commit is contained in:
Martin Pepin 2016-11-14 06:48:08 +01:00
commit dc1ed332df
2 changed files with 3 additions and 4 deletions

View file

@ -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)

View file

@ -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