forked from DGNum/gestioCOF
Remplace simplejson par json de la bibliothèque standard
This commit is contained in:
parent
b60365ddd6
commit
3c362014b0
2 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue