Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django create model from dictionary

# create instance of model
m = MyModel(**data_dict)
# don't forget to save to database!
m.save()
 
PREVIOUS NEXT
Tagged: #django #create #model #dictionary
ADD COMMENT
Topic
Name
3+1 =