0
Because I had multiple entries in the table, I used an update field to updated the cells in the table. This is what I did:
o = Model.objects.filter(x=value0).values_list("id", flat=True) #where x is posted information getting the primary key (id).
Model.objects.select_related().filter(id = o).update(column = value, column2 = value2)
The update field does not need a .save()
as it will update the table when it is called.
I would like to thank Udi for his answer as it did step me into the right direction.
1
Instead of:
obj_ex = Model(column=value, column2=value2)
Which creates a new instance (and later a new db record) try:
o = Model.objects.get(pk=1234) # load instance with id=1234 to memory from db
o.column = value
o.column2 = value2
o.save()
Source:stackexchange.com