forked from DGNum/gestioCOF
Merge branch 'Elarnon/json' into 'master'
Remplace simplejson par json de la bibliothèque standard See merge request !115
This commit is contained in:
commit
dc1ed332df
2 changed files with 3 additions and 4 deletions
|
@ -30,7 +30,7 @@ from captcha.fields import ReCaptchaField
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import base64
|
import base64
|
||||||
import simplejson
|
import json
|
||||||
|
|
||||||
|
|
||||||
def render_template(template_path, data):
|
def render_template(template_path, data):
|
||||||
|
@ -153,7 +153,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for,
|
||||||
"proposed_mails": proposed_mails,
|
"proposed_mails": proposed_mails,
|
||||||
"mainmail": mainmail,
|
"mainmail": mainmail,
|
||||||
"attribdata":
|
"attribdata":
|
||||||
base64.b64encode(simplejson.dumps(attribdata)
|
base64.b64encode(json.dumps(attribdata)
|
||||||
.encode('utf_8')),
|
.encode('utf_8')),
|
||||||
"redo": redo,
|
"redo": redo,
|
||||||
"errors": errors,
|
"errors": errors,
|
||||||
|
@ -262,7 +262,7 @@ def _traitement_post(request, demande):
|
||||||
extra = request.POST["extra"].strip()
|
extra = request.POST["extra"].strip()
|
||||||
redo = "redo" in request.POST
|
redo = "redo" in request.POST
|
||||||
attribdata = request.POST["attribdata"]
|
attribdata = request.POST["attribdata"]
|
||||||
attribdata = dict(simplejson.loads(base64.b64decode(attribdata)))
|
attribdata = dict(json.loads(base64.b64decode(attribdata)))
|
||||||
for matiere in demande.matieres.all():
|
for matiere in demande.matieres.all():
|
||||||
if matiere.id not in attribdata:
|
if matiere.id not in attribdata:
|
||||||
unsatisfied.append(matiere)
|
unsatisfied.append(matiere)
|
||||||
|
|
|
@ -7,7 +7,6 @@ django-grappelli==2.8.1
|
||||||
django-recaptcha==1.0.5
|
django-recaptcha==1.0.5
|
||||||
mysqlclient==1.3.7
|
mysqlclient==1.3.7
|
||||||
Pillow==3.3.0
|
Pillow==3.3.0
|
||||||
simplejson==3.8.2
|
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
unicodecsv==0.14.1
|
unicodecsv==0.14.1
|
||||||
icalendar==3.10
|
icalendar==3.10
|
||||||
|
|
Loading…
Reference in a new issue