Python/Django: Populating Model Form Fields with values from Imported JSON file
Python/Django: Populating Model Form Fields with values from Imported JSON file I have a model form that saves all form field inputs to the backend database as one entry. I also have a JSON file that contains multiple JSON objects whose fields corresponds to the model form field. This JSON file is being uploaded via FileField in the model. Ultimately, I want to be able to upload a JSON file with the multiple JSON objects into my model form and populate the fields with the corresponding values from the uploaded JSON file. Each JSON object will be a single entry to my database and they can have null values for at least one field. Ideally, I would like to be able to choose which JSON object (from the uploaded JSON file) gets loaded to my model form fields to eventually be saved in my database. How would I go about implementing this? docs.python.org/3/tutorial/… – Ignacio Vazquez-Abrams Jun 29 at 23:50 ...
