I have a model in django that I want to update only, that is, when I call it and set the data, it will not create a new record, only update the existing one. How can I do th
Sometimes it may be required to execute the update atomically that is using one update request to the database without reading it first.
Also get-set attribute-save may cause problems if such updates may be done concurrently or if you need to set the new value based on the old field value.
In such cases query expressions together with update may by useful:
TemperatureData.objects.filter(id=1).update(value=F('value') + 1)