Django partial update
问题 I have two threads, one which runs something like update t set ColA=foo and the other runs update t set ColB=foo . If they were doing raw SQL statements there would be no contention, but since Django gets and saves the entire row, a race condition can occur. Is there any way to tell Django that I just want to save a certain column? 回答1: You are correct that save will update the entire row but Django has an update which does exactly what you describe. https://docs.djangoproject.com/en/stable