Can a dictionary be passed to django models on create?
If title and body are fields in your model, then you can deliver the keyword arguments in your dictionary using the ** operator. Assuming your model is called MyModel: # create instance of model m = MyModel(**data_dict) # don’t forget to save to database! m.save() As for your second question, the dictionary has to be … Read more