[Fixed]-Parsing a JSON file and adding it to a model

0👍

I solved the problem by replacing

import os
os.environ["DJANGO_SETTINGS_MODULE"] =  "json_api.settings"

by

from json_api.wsgi import *

where json_api is my project name . Thanks for the help !

1👍

You’re missing close parens for the int calls from fuel and all four of the tirep_* values.

0👍

You forgot lots of closing parentheses:

fuel=int(data["Params"]["Fuel"]), 
tirep_fl=int(data["Params"]["Fuel"]["frontLeft"]),
tirep_fr=int(data["Params"]["TireP"]["frontRight"]),
tirep_bl=int(data["Params"]["TireP"]["backLeft"]),
tirep_br=int(data["Params"]["TireP"]["backRight"])

Leave a comment