Hallo Ich versuche, JSON-Array in django von android die von android sieht aus wieParsing json Array in django
[{"record":[{"intensity":"Low","body_subpart":"Scalp","symptom":"Agitation"}]}]
Jetzt ist meine Funktion in django wie unten gesendet json Antwort gesendet zu analysieren:
record = simplejson.loads(request.POST['record'])
for o in record:
new_symptoms=UserSymptoms(health_record=new_healthrecord,body_subpart=o.body_subpart,symptoms=o.symptom,intensity=o.intensity)
new_symptoms.save()
aber seine Arbeit nicht gving mir Fehler Dafür habe ich auch versucht,
obigen Zeilen in python-Shell auszuführen
Warum 'rec.body_subpart' anstelle von' o.body_subpart'? – San4ez
Entschuldigung Tippfehler seine o.body_subpart – user1163236